2014-06-17 56 views

回答

0

使用此简单的命令

$find ~ -mtime -30 | xargs tar -cvf Tar_File.tar 

Explanation:  

find  -- To find the files recursively 
-mtime -- specified the modification time of last 30 days 
xargs --The given output is passed as an input using pipe | and xargs convert 
      all input as an arguments . 
tar  --tar comand tar the files 
+0

我不会用这一点。如果您修改在过去30天足够的文件'xargs'决定这个分成两个命令,不好的事情会发生......假设你有GNU'tar',使用'-T '选项或' - -newer ='或'--after-date ='选项会好得多...... – twalberg