1.w | cut -d’ ‘ -f1 | uniq
2.grep -E “($(w | cut -d’ ‘ -f1 | tail -1))” /etc/passwd
3.cut -d’:’ -f7 /etc/passwd | uniq -c | sort -n | tail -1
4.grep -E “$(cut -d’:’ -f3 /etc/passwd | sort -n | tail -10)” /etc/passwd > /tmp/test1
tr [a-z] [A-Z] < /tmp/test1
5.ifconfig | grep inet | cut -d’:’ -f2 | cut -d ‘ ‘ -f1 | head -1
6./etc/ | grep -E ‘.*.conf\>$’ | tr [a-z] [A-Z] > /tmp/etc.conf
7.ls /var | wc -w
8.sort -t’:’ -k3 -n /etc/group | tail -10 | cut -d’:’ -f1
9.cat /etc/issue /etc/fstab > /tmp/etc.test
10.[root@localhost ~]# groupadd -g 2016 distro
[root@localhost ~]# useradd -u 1005 -g distro mandriva
[root@localhost ~]# useradd -u 1100 -d /home/linux mageia
[root@localhost ~]# echo ‘magedu’ | passwd –stdin mageia
[root@localhost ~]# userdel mandriva
[root@localhost ~]# groupadd peguin
[root@localhost ~]# useradd -u 2002 -g distro -G peguin slackware
[root@localhost ~]# usermod -s /bin/tcsh slackware
[root@localhost ~]# groupadd admins
[root@localhost ~]# usermod -a -G admins slackware
本文来自投稿,不代表Linux运维部落立场,如若转载,请注明出处:http://www.178linux.com/100860