find

find

查找文件或目录
find 查找范围 查找条件

-name按名称查找
-maxdepth查看多深的文件,不能超过所限制的目录下的内容
-mindepth查看不小于多深的文件,不低于所限制内容
-not
-o
-a
-user查找属于某用户的文件
-group查找属于某用户组的文件
-size按文件大小查找
-atimeaccess time按访问时间查找文件
-mtimemodify time按修改时间查找文件
-ctimechange time按状态修改时间查找文件
-perm按权限查找
#!/bin/bash
#按名称查找
find /etc/ -name "*.conf"
#查看文件最大深度
find /etc/ -maxdepth 4 -name "*.conf"
#查看文件最低深度
find /etc/ -maxdepth 1 -name "*.conf"
#查找某用户的文件
find /etc/ -user user1
#与或非
find /etc/ -user user1 -o -user user2
#查找1m的文件
find /etc/ -size 1M
#查找不大于1M的文件
find /etc/ -size -1M
#查找不小于1M的文件
find /etc/ -size +1M
#访问时间7day|以上|以下
find /etc/ -atime 7
find /etc/ -atime +7
find /etc/ -atime -7
#修改时间7day|以上|以下
find /etc/ -mtime 7
find /etc/ -mtime +7
find /etc/ -mtime -7
#状态修改时间7day|以上|以下
find /etc/ -ctime 7
find /etc/ -ctime +7
find /etc/ -ctime -7
#查找权限为666的文件
find /etc/ -perm 666
#查找u、g、o均有读写权限的文件
find /etc/ -perm -666
#查找u、g、o至少有一个有读写权限的文件
find /etc/ -perm /666

计算机英语

modify修改
depth深度
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值