二周第五次课(12月22日)
2.23/2.24/2.25 find命令
find /路径 类型(type d 目录 或type f 文件) -name "***"
which
whereis
locate
stat 列出文件信息
atime 最近访问时间 mtime 最近更改时间 ctmie 最近改动时间(大小,时间,权限,所有者)
查找更改时间在1天以内的文件 +1表示大于1天
查找更改时间60分钟以内
或者 -o
查找一个文件的所有硬链接 find / -inum ***
查找出文件并列出文件信息find /root/ -type f -mmin -120 -exec ls -l{} \;
查找并改名 find /root/ -type f -mmin -150 -exec mv {} {}.bak \;
查找并列出大于10k的文件find /root/ -type f -size +10k -exec ls -lh {} \;
10M 10k 10b
2.26 文件名后缀
linux下后缀名不严谨,仅是约定。