Bash Command to Delete all Files Based on Age
To delete all files in the current directory (and all subdirectories) based on age (in this case, 7 days), you can use the following: find `pwd -P` -mtime +7 -ctime +7 | xargs -I {} bash -c ‘if [ ! -d {} ] ; then \ echo {}; fi’ | xargs -I {} rm -f Read More …