Find the directories which is older than x days delete and zip those directories
Hi All
1) i want delete the direcotries which is older than 3 months ex. /opt/pat/phd in this phd directory daily created some directories and for each directory is having different files ex txt,log ect so i want remove all files also 2) i want compress the directories which is older than 3 months ex./opt/pat/phd in this phd directory daily created some directories i think based on timestamp not exactly i want compress those directories which is older than 7 days. please let me know if any one knows. Thsnks in advance, Ramesh |
|
Quote:
Pay particular attention to the "-*time" flags on the find command (mtime, ctime, atime), and the "-rf" flag on the rm command. |
All times are GMT -5. The time now is 07:54 PM. |