Find the files that have been changed in last 24 hours

前端 未结 6 2174
情书的邮戳
情书的邮戳 2020-11-29 14:36

E.g., a MySQL server is running on my Ubuntu machine. Some data has been changed during the last 24 hours.

What (Linux) scripts can find the files that have been cha

6条回答
  •  执念已碎
    2020-11-29 15:36

    To find all files modified in the last 24 hours (last full day) in a particular specific directory and its sub-directories:

    find /directory_path -mtime -1 -ls
    

    Should be to your liking

    The - before 1 is important - it means anything changed one day or less ago. A + before 1 would instead mean anything changed at least one day ago, while having nothing before the 1 would have meant it was changed exacted one day ago, no more, no less.

提交回复
热议问题