1、显示/etc目录下,以非字母开头,后面跟了一个字母以及其它任意长度字符的文件或目录 ls -ld /etc/[^[:alpha:]][[:alpha:]]* 2、复制/etc目录下所有以p开头,以非数字结尾的文件或目录到/tmp/没有test1目录中 mkdir /tmp/mytest1 cp -vr /etc/p*[^[:digit:]] /tmp/mytest1 3、将/etc/issue文件中的内容转换为大写后保存至/tmp/issue.out文件中 [root@localhost mytest1]# cat /etc/issue \S Kernel \r on an \m cat /etc/issue | tr 'a-z' 'A-Z' >> /tmp/issue.out 4、请总结描述用户和组管理类命令的使用方法并完成以下练习: (1)、创建组distro,其GID为2019; usergroup -g 2019 distro (2)、创建用户mandriva,其ID号为1005;基本组为distro useradd -u 1005 -g distro mandriva (3)、创建用户mageia,其ID号为1100,家目录为/home/linux; useradd -u 1100 -d /home/linux mageia (4)、给用户mageia添加密码,密码为mageedu,并设置用户密码7天后过期; passwd -x 7 mageia getent shadow echo "mageedu" | passwd --stdin mageia (5)、删除mandriva,但保留其家目录; [root@localhost mytest1]# userdel mandriva [root@localhost mytest1]# ls /home/ carol help linux mandriva slackware (6)、创建用户slackware,其ID号为2002,基本组为distro,附加组peguin; [root@localhost mytest1]#useradd -u 2002 -g distro -G peguin slackware (7)、修改slackware的默认shell为/bin/tcsh; [root@localhost mytest1]#usermod -s /bin/tcsh slackware (8)、为用户slackware新增附加组admins; [root@localhost mytest1]#usermod -a -G admins slackware