开发者

How to list last changed files in one directory

if anyone hacks a site, then I would like to check which files are changed maybe in the last 24 hours in the directory htdocs, that means the files in the subdirectories form htdocs too. How to do this?

I will be happy 开发者_StackOverflowfor any suggestions,

Cheers Nik


find {dir} -mtime -1 -print

will find files modified in the last 24 hours (-1 = 1 day)

If you're using zsh, then you can do:

ls **/*(mh-24)

which shows you files modified in the last 24 hours (you can specify different params for minutes/hours etc. and whether you want modified/accessed etc.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜