Linux——find -type命令

2023-05-16

find -type命令查找某一类型的文件,后面跟着不同的字母表示不同的文件类型查询manual如下:

字母文件类型
bblock (buffered) special
ccharacter (unbuffered) special
ddirectory(目录)
pnamed pipe (FIFO)(命名管道)
lsymbolic link; this is never true if the -L option or the -follow option is in effect, unless the symbolic link is broken. If you want to search for symbolic links when -L is in effect, use -xtype. (软连接;如果-L或者-follow选项生效,这个字母就不能用,除非软连接断开了。如果你想在-L生效的时候,搜索软连接,使用-xtype选项)
fregular file(普通文件)
ssocket
Ddoor (Solaris)
To search for more than one type at once, you can supply the combined list of type letters separated by a comma `,’ (GNU extension).
翻译:如果单次搜索超过一种类型,那么你能使用“,”符号隔开类型字母。(GNU扩展)

下面举个例子:

find -type f

表示搜索的文件类型为普通文件。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Linux——find -type命令 的相关文章

随机推荐