2014-06-17 4 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'가 2 개의 명령으로 나눌 것을 결정한 충분한 파일을 수정했다면, 나쁜 일이 일어날 것입니다 ...'-T '옵션이나'--T '옵션을 사용하여 GNU'tar' -newer ='또는'--after-date ='옵션이 훨씬 더 좋을 것입니다 ... – twalberg

관련 문제