复制/etc目录下所有以p开头,以非数字结尾的文件或目录到/tmp/mytest1目录中。
[root@192 ~]# mkdir /tmp/mytest1
[root@192 ~]# cp -r /etc/p*[^0-9] /tmp/mytest1
[root@192 ~]# ls -d /etc/p*[^0-9]
/etc/pam.d /etc/passwd- /etc/plymouth /etc/popt.d /etc/ppp /etc/printcap /etc/profile.d /etc/python
/etc/passwd /etc/pki /etc/pm /etc/postfix /etc/prelink.conf.d /etc/profile /etc/protocols
[root@192 ~]# ls /tmp/mytest1
pam.d passwd passwd- pki plymouth pm popt.d postfix ppp prelink.conf.d printcap profile profile.d protocols python