一、通过文件修改时间查询
1.查找5分钟前的文件
[root@tianyi ~]
1 /etc
2 /etc/pear.conf
3 /etc/NetworkManager
4 /etc/NetworkManager/conf.d
5 /etc/NetworkManager/conf.d/99-cloud-init.conf
6 /etc/NetworkManager/NetworkManager.conf
7 /etc/NetworkManager/dnsmasq.d
8 /etc/NetworkManager/system-connections
9 /etc/NetworkManager/dnsmasq-shared.d
10 /etc/NetworkManager/dispatcher.d
[root@tianyi ~]
二、通过文件权限查找
1.创建不同权限文件夹
[root@tianyi ~]
[root@tianyi ~]
[root@tianyi ~]
[root@tianyi ~]
2.查找其他人有写的文件夹
[root@tianyi data]
./test1
./test2
[root@tianyi data]
drwxrwxrwx 2 root root 4096 Dec 29 11:05 ./test1
[root@tianyi data]
dr-----rw- 2 root root 4096 Dec 29 11:05 ./test2
3.查找拥有人、拥有组、其他人都有写权限文件夹
[root@tianyi data]
./test1
[root@tianyi data]
drwxr-xr-x 2 root root 4096 Dec 1 00:48 ./test
[root@tianyi data]
drwxrwxrwx 2 root root 4096 Dec 29 11:05 ./test1
[root@tianyi data]
4.查找拥有人有读权限的文件夹
[root@tianyi data]
.
./test1
./test
./passwd
./scrips
./person.txt
[root@tianyi data]
三、查找文件并处理
1.创建备份文件夹
[root@tianyi data]
2.备份以conf的文件
[root@tianyi backup]
cp: not writing through dangling symlink '/backup/yum.conf'
cp: '/etc/authselect/nsswitch.conf' and '/backup/nsswitch.conf' are the same file
[root@tianyi backup]
^C
[root@tianyi backup]
00-base.conf
00-dav.conf
00-keyboard.conf
00-lua.conf
00-mpm.conf
00-optional.conf
00-proxy.conf
00-systemd.conf
01-cgi.conf
05-redhat.conf