Linux——find -type命令

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

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

  • 0
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值