find -type命令查找某一类型的文件,后面跟着不同的字母表示不同的文件类型查询manual如下:
字母 | 文件类型 |
---|
b | block (buffered) special |
c | character (unbuffered) special |
d | directory(目录) |
p | named pipe (FIFO)(命名管道) |
l | symbolic 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选项) |
f | regular file(普通文件) |
s | socket |
D | door (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(使用前将#替换为@)