标签: file bash datetime find tar
很多人希望找到超过x天的文件,但在我的情况下,我需要找到一个7天以下的焦油。
如果我能提供更多详情,请告诉我。
谢谢
答案 0 :(得分:3)
这将打印小于604800秒的最旧的tar文件(如果有):
find /location/ -name \*.tar -mtime -7 -print0 | xargs -0 ls -rt | head -1