[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: achive and remove old files



As Steve already said, here is an example of script (lightly better) :
You can work only with files not on sub directories.
find  /somedir  \(  -type  f  -a  -mtime  +730  \)  -exec  mv  -f  {}  /anydir  \;
 
Patrick - rhce


Jianping Zhu <jzhu fisher forestry uga edu> wrote:
S redhat 9.0
I have a huge direcory (more than 30 GB) I want to take all the files
and sub-dirctries which have not been modified or used for more than
two year out of the diretory and achive it then delete them them from
the original direcoty. Does anyone have a script to do this kind of
work?
Thank


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request redhat com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

		
---------------------------------
 Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]