find 命令使用(2)

find 查找命令

-size

查找指定文件的大小;大于+100M(K,M,G);-100小于;100 等于

-mtime

指定时间查找;+5是5天前的;-5是5天后的;5第5天

-perm

查找权限

 

说明:由这个时间我们可以知道,最右边为当前时,+5 代表大于等于6 天前的档案名, -5 代表小于等于5 天内的档案名,5 则是代表5-6 那一天的档案名 

实例:

[root@BingwuA atsshell]# find ./ -type f -mtime +5

./atsmenu.sh

./ats-text.sh

./atsscripts/chinese.txt

 [root@BingwuA atsshell]# find / -type f -size +100M|xargs ls -lhr

find: `/proc/14744/task/14744/fdinfo/5': No such file or directory

find: `/proc/14744/fdinfo/5': No such file or directory

-rw------- 1 root root 128M Sep 10 23:32 /sys/devices/pci0000:00/0000:00:0f.0/resource1_wc

-rw------- 1 root root 128M Sep 10 23:32 /sys/devices/pci0000:00/0000:00:0f.0/resource1

 

root@BingwuA atsshell]# find / -type f -perm 4755|xargs ls -l

find: `/proc/14782/task/14782/fdinfo/5': No such file or directory

find: `/proc/14782/fdinfo/5': No such file or directory

-rwsr-xr-x. 1 root root  77336 May 11  2016 /bin/mount

-rwsr-xr-x. 1 root root  38264 May 11  2016 /bin/ping

-rwsr-xr-x. 1 root root  36488 May 11  2016 /bin/ping6

-rwsr-xr-x. 1 root root  34904 May 11  2016 /bin/su

-rwsr-xr-x. 1 root root  53472 May 11  2016 /bin/umount

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值