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

猜你喜欢

转载自blog.csdn.net/LINU_BW/article/details/84894616