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

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

问题描述

例如,MySQL 服务器正在我的 Ubuntu 机器上运行.部分数据在过去 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天全站免登陆