【问题标题】:Find files created in specific months in multiple years查找在多年中特定月份创建的文件
【发布时间】:2014-06-12 17:34:15
【问题描述】:

在 OS X 中 - gui 或 cli

我想查找在一系列年份中特定月份创建的文件。

例如。 1998-2012 年 4 月创建的所有 mp3 文件

建议?

【问题讨论】:

    标签: macos unix search find


    【解决方案1】:

    我可能会使用触摸文件并使用 awk 查找和后处理

    touch -t 199801010000.01 startfile
    touch -t 201212312359.59 endfile
    find /path/to/mp3dir -type f -iname "*.mp3" -newer startfile -not -newer endfile -ls | awk '{ if ($8 == "Apr") print }'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多