需要 tar 个 48 小时内的旧文件或新文件

Need to tar files old or newer than 48 hrs

我需要 tar -cvf 但只有 tar 在 48 小时内在我们的邮件目录中添加或更改的文件

我怎么能那样。感谢您的帮助。

尝试这样的事情

find MYMAILDIR -ctime 2 | xargs tar -cvf OUTPUT.tar

如果您的文件名中有空格,则在 find 中使用 -print0,在 xargs 中使用 -0