2015-10-16

[SOLVED]Find and delete files older specific days

10:39 10/04/2015
################
#90 days
find /root/server -type f -mtime +90 -exec rm -rf {} \;

#365 days
find /root/server -type f -mtime +365 -exec rm -rf {} \;

#3 days
find /root/server -type f -mtime +3 -exec rm -rf {} \;


http://ithelpblog.com/os/linux/bashandscripts/find-and-delete-remove-files-older-specific-days-on-linux/


find /opt/www/file.mgiay.com/ -type f -exec bash -c 'rm -rf index.html*' {} \;







find / -name "haproxy" -mtime +365 -exec rm -rf {} \;

No comments:

Post a Comment