linux - Shell 命令检查文件是否有今天的日期

标签 linux bash shell unix

您能帮我检查一下文件是否有当前日期。

最佳答案

在 GNU 系统上:

find yourfile -maxdepth 0 -daystart -mtime -1 -print

...仅当 yourfile 比当天开始时更新时才会发出输出。

关于linux - Shell 命令检查文件是否有今天的日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55925144/

相关文章:

linux - 是否可以使用 Chef 在 RHEL 上使 iptables 幂等?

c - 如何在 linux 中编译二进制文件,它可以在没有前面的情况下运行。/

linux - bash脚本测试字符串上多个参数的条件

linux - 如何将 stdout、stderr 重新路由回/dev/tty

bash - 如何在 Windows 的 git bash 中运行 "make"命令?

Python 模块导入

linux - 如何为 Linux : KDE, Gnome 等设置我的应用程序桌面图标?

bash - cd 使用 bash rematch 和 pwd 的结果

linux - 在 bash shell 脚本中是否有通常用于比较时间的命令?

bash - shell :在 ubuntu 12.04 上安装 gawk