cp -r /etc/skel/ /home/tuser1
chmod -R 700 /home/tuser1
ll -d /home/tuser1
echo "hadoop:x:3006:" >> /etc/group
tail -1 /etc/group
echo "hadoop:x:3006:3006::/home/hadoop:/bin/bash" >>/etc/passwd
tail -1 /etc/passwd
cp -r /etc/skel/ /home/hadoop
chmod 700 /home/hadoop/
chown -R hadoop.hadoop /home/hadoop/
ll -a /home/hadoop/
grep "^[Ss]" /proc/meminfo
SwapCached: 0 kB
SwapTotal: 2097144 kB
SwapFree: 2097144 kB
Shmem: 248 kB
Slab: 64992 kB
SReclaimable: 12376 kB
SUnreclaim: 52616 kB
或者
grep -i "^s" /proc/meminfo
SwapCached: 0 kB
SwapTotal: 2097144 kB
SwapFree: 2097144 kB
Shmem: 248 kB
Slab: 64992 kB
SReclaimable: 12372 kB
SUnreclaim: 52620 kB
grep -v "/sbin/nologin" /etc/passwd | cut -d: -f1
grep "/bin/bash" /etc/passwd | cut -d: -f
grep "\<[[:digit:]]\{1,2\}\>" /etc/passwd
grep "^[[:space:]]\+" /boot/grub/grub.conf
grep "^#[[:space:]]\+[^[:space:]]\+" /etc/rc.d/rc.sysinit
netstat -tan | grep -E "\<LISTEN[[:space:]]+"
useradd bash
useradd -s /sbin/nologin testbash
useradd basher
useradd nologin
cat /etc/passwd | cut -d : -f 1,7 | grep "/sbin/nologin"
原创文章,作者:Leexide,如若转载,请注明出处:http://www.178linux.com/49844