查找最近24小时内已更改的文件 [英] Find the files that have been changed in last 24 hours

查看:498
本文介绍了查找最近24小时内已更改的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,我的Ubuntu计算机上正在运行MySQL服务器.最近24小时内某些数据已更改.

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

什么(Linux)脚本可以找到最近24小时内已更改的文件?

What (Linux) scripts can find the files that have been changed during the last 24 hours?

请列出文件名,文件大小和修改时间.

Please list the file names, file sizes, and modified time.

推荐答案

要查找特定特定目录及其子目录中最近24小时(最后一整天)内修改的所有文件:

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

应该按您的喜好

1之前的-很重要-表示一天或更短时间内发生的任何更改. 相反,在1之前的+意味着至少一天前已进行了任何更改,而在1之前没有任何内容将意味着它已在一天前进行了严格的更改.

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.

这篇关于查找最近24小时内已更改的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆