linux - 如何在 Linux 中查找最近或今天修改过的文件
问题描述
我有一个要求,必须找出最新修改的文件列表以及日期和时间。主要是我们有2 个与 boot.properties 和 ldap 相关的文件作为 beadmin 密码更改活动的一部分。
find /target_directory -type f -name "*boot.properties" -exec ls -ltr {} \;
只给出 boot.properties 但我需要找到位于不同位置的其他文件。
解决方案
find
支持多个路径参数,所以你可以做类似的事情
find /target_dir /other -type f \( -name "*boot.properties" -o -name "other*" \) -exec ls -ltr {} +
推荐阅读
- mysql - how to exclude rows that have duplicates? (Remove)
- linux - Linux:从 for 和 cut 中删除重复的字符串
- python - PyCharm is not getting along with OpenCV's imshow()
- c# - c# Regex for all except single,double quotes and comma
- amazon-web-services - AWS Lambda function API end point - 403 and 415 error
- swift - 自定义 UIView 在 UIViewController 中添加为子视图时不响应
- python - 针对 SQL Server 的 Prefetch_related 失败
- c# - 如果子列表为空,则无法使用 linq 转换具有子列表的对象列表?
- python - Python:如果没有任何尝试理解处理输出的差异
- structure - 定义为结构的 2 个多项式的乘法函数