find -name "" -mtime +N -exec rm -r {} \;
Eg :
find /var/log/ -name "*.log" -mtime +5 -exec rm -r {} \;
This will remove the *.log files older than 5 days in directory /var/log/
Find with file type
directories :
find / -type d -print0files:
find / -type f -print0
No comments:
Post a Comment