查找当前目录下某个文件

find . –name  [filename]

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

linux find查找文件/目录 随笔 第1张

-i  不区分大小写

find . –iname [filename]

linux find查找文件/目录 随笔 第2张

-type 按类型进行查找,d查找目录,f查找文件

find . –type d –name [document]

find . type f –name [filename]

linux find查找文件/目录 随笔 第3张

-user 按所有者查找文件/目录

find . –user  [username]

find . –user root

linux find查找文件/目录 随笔 第4张

-group 按用户组查找文件/目录

find . –group  [groupname]

find . –group root

linux find查找文件/目录 随笔 第5张

其他的查询

find . –type f –mtime 1   查找1天前修改的文件

find . –type f –cmin -60 查找1小时内更改过的文件

find . –type  f –size +50MB –size -100MB 查找50MB到100MB的所有文件

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄