2、复制/etc目录下所有以p开头,以非数字结尾的文件或目录到/tmp/mytest1目录中。

2、复制/etc目录下所有以p开头,以非数字结尾的文件或目录到/tmp/mytest1目录中。

[root@CentOS8 /bin]#ls /etc/p*[^[:digit:]] -ld

drwxr-xr-x.  2 root root 4096 Apr  6 19:13 /etc/pam.d

-rw-r--r--.  1 root root   68 May 14  2019 /etc/papersize

-rw-r--r--.  1 root root 2560 Apr  3 15:09 /etc/passwd

-rw-r--r--.  1 root root 2505 Apr  3 15:04 /etc/passwd-

-rw-r--r--.  1 root root 1362 May 14  2019 /etc/pbm2ppa.conf

-rw-r--r--.  1 root root 2872 May 14  2019 /etc/pinforc

drwxr-xr-x.  2 root root   27 Apr  3 15:00 /etc/pipewire

drwxr-xr-x. 10 root root  123 Apr  3 15:03 /etc/pki

drwxr-xr-x.  2 root root   28 Apr  3 15:00 /etc/plymouth

drwxr-xr-x.  5 root root   52 Apr  3 14:59 /etc/pm

-rw-r--r--.  1 root root 6300 May 14  2019 /etc/pnm2ppa.conf

drwxr-xr-x.  2 root root    6 Jan 19  2021 /etc/popt.d

drwxr-xr-x.  2 root root   24 Apr  3 15:00 /etc/prelink.conf.d

-rw-r--r--.  1 root root  233 Sep 10  2018 /etc/printcap

-rw-r--r--.  1 root root 2123 May 15  2020 /etc/profile

drwxr-xr-x.  2 root root 4096 Apr  4 23:05 /etc/profile.d

-rw-r--r--.  1 root root 6568 Sep 10  2018 /etc/protocols

drwxr-xr-x.  2 root root   79 Apr  3 15:00 /etc/pulse

 

[root@CentOS8 /bin]#mkdir /tmp/mytest1

[root@CentOS8 /bin]#cp -r /etc/p*[^[:digit:]] -ld /tmp/mytest1/

 

[root@CentOS8 /bin]#ll /tmp/mytest1/

total 52

drwxr-xr-x.  2 root root 4096 Apr  8 00:05 pam.d

-rw-r--r--.  2 root root   68 May 14  2019 papersize

-rw-r--r--.  2 root root 2560 Apr  3 15:09 passwd

-rw-r--r--.  2 root root 2505 Apr  3 15:04 passwd-

-rw-r--r--.  2 root root 1362 May 14  2019 pbm2ppa.conf

-rw-r--r--.  2 root root 2872 May 14  2019 pinforc

drwxr-xr-x.  2 root root   27 Apr  8 00:05 pipewire

drwxr-xr-x. 10 root root  123 Apr  8 00:05 pki

drwxr-xr-x.  2 root root   28 Apr  8 00:05 plymouth

drwxr-xr-x.  5 root root   52 Apr  8 00:05 pm

-rw-r--r--.  2 root root 6300 May 14  2019 pnm2ppa.conf

drwxr-xr-x.  2 root root    6 Apr  8 00:05 popt.d

drwxr-xr-x.  2 root root   24 Apr  8 00:05 prelink.conf.d

-rw-r--r--.  2 root root  233 Sep 10  2018 printcap

-rw-r--r--.  2 root root 2123 May 15  2020 profile

drwxr-xr-x.  2 root root 4096 Apr  8 00:05 profile.d

-rw-r--r--.  2 root root 6568 Sep 10  2018 protocols

drwxr-xr-x.  2 root root   79 Apr  8 00:05 pulse

posted @   惊起千层浪  阅读(218)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
点击右上角即可分享
微信分享提示