二周第五次课(12月22日)

2.23/2.24/2.25 find命令

find /路径 类型(type d 目录 或type f 文件) -name "***"

which

whereis

locate

二周第五次课(12月22日)_linux

二周第五次课(12月22日)_linux_02

二周第五次课(12月22日)_linux_03

stat 列出文件信息

atime 最近访问时间 mtime 最近更改时间 ctmie 最近改动时间(大小,时间,权限,所有者)

二周第五次课(12月22日)_linux_04

二周第五次课(12月22日)_linux_05

查找更改时间在1天以内的文件 +1表示大于1天

二周第五次课(12月22日)_linux_06

查找更改时间60分钟以内

二周第五次课(12月22日)_linux_07

或者 -o

二周第五次课(12月22日)_linux_08

查找一个文件的所有硬链接 find / -inum ***

二周第五次课(12月22日)_linux_09

查找出文件并列出文件信息find /root/ -type f -mmin -120 -exec ls -l{} \;

二周第五次课(12月22日)_linux_10

查找并改名 find /root/ -type f -mmin -150 -exec mv {} {}.bak \;

二周第五次课(12月22日)_linux_11

查找并列出大于10k的文件find /root/ -type f -size +10k -exec ls -lh {} \;

二周第五次课(12月22日)_linux_12

10M 10k 10b

二周第五次课(12月22日)_linux_13



2.26 文件名后缀

linux下后缀名不严谨,仅是约定。