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
表示搜索的文件类型为普通文件。

技术
下载桌面版
GitHub
百度网盘(提取码:draw)
Gitee
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:766591547
关注微信