通配符

2、通配符:* 任意多个字符 ? 单个字符

查找tty包含单个字符的目录或文件
[root@localhost etc]# ls /dev/tty?
查找tty开头的文件或目录
[root@localhost etc]# ls /dev/tty*

在/etc目录查找以.conf结尾的文件或目 [root@localhost etc]# ls /etc/*.conf

在/etc目录查找以tab结尾的文件或目录 [root@localhost etc]# ls /etc/*tab

在/boot目录查找以 V开头的文件或目录 [root@localhost etc]# ls /boot/V*

在/root目录查找以a开头的目录 [root@localhost etc]# ls /root/a*
查看多个目录或文件
[root@localhost ~]# ls /etc /dev /boot

绝对路径:以/开头
相对路径:不以/开头

    原文作者:wx5dbba62d883bd
    原文地址: https://blog.51cto.com/14596382/2448872
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞