一、文件系统和目录结构








基名、目录名
[root@localhost /bin]#ll /etc/sysconfig/network-scripts/ifcfg-ens192
-rw-r--r--. 1 root root 427 Dec 26 2018 /etc/sysconfig/network-scripts/ifcfg->ens192取基名-文件本身
[root@localhost /bin]#basename /etc/sysconfig/network-scripts/ifcfg-ens192
ifcfg-ens192取目录名-目录路径
[root@localhost /bin]#dirname /etc/sysconfig/network-scripts/ifcfg-ens192
/etc/sysconfig/network-scripts




[root@localhost /home/unnet/data]#ll f*
-rw-r--r-- 1 root webs 406 Jul 5 12:00 f
-rw-r--r-- 1 root webs 465 Jul 5 14:29 f1
-rw-r--r-- 1 root webs 480 Jul 4 19:38 f3
[root@localhost /home/unnet/data]#ll *.txt
-rw-r--r-- 1 root webs 192 Jul 4 16:32 a.txt
-rw-rw-r-- 1 unnet webs 10 Jul 4 15:48 b.txt
-rw-rw-rwx 1 unnet unnet 70 Jul 4 16:12 c.txt
-rw-rw-rwx 1 unnet unnet 11 Jul 4 16:39 d.txt
-rw-rw-r-- 1 missbe webs 50 Jul 4 17:37 e.txt
-rw-rw-r-- 1 missbe webs 0 Jul 4 11:50 t.txt
-rw-r--r-- 1 root webs 340 Jul 4 12:16 txt.txt
[root@localhost /home/unnet/data]#ll f?
-rw-r--r-- 1 root webs 465 Jul 5 14:29 f1
-rw-r--r-- 1 root webs 480 Jul 4 19:38 f3

网友评论