Re: achive and remove old files

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

 



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@xxxxxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxx?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
-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux