Linux:遍历文件夹,找到最近修改的文件

1
2
#!/bin/bash
find $1 -type f -exec stat --format '%Y :%y %n' "{}" \; | sort -nr | cut -d: -f2- | head

或者

To find all files that file status was last changed N minutes ago:

1
find -cmin -N

for example:

1
find -cmin -5