find:find_and_delete_files_after_a_certain_time
Find - Find and delete files after a certain time
find /path/to/folder -type f -name "<regex-for-file-name>" -mtime +<number-of-days> -exec <bash-command> {} \;
Example usage:
find /var/spool/somedir/someotherdir -type f -name "msg*" -mtime +30 -exec rm {} \;
find/find_and_delete_files_after_a_certain_time.txt · Last modified: 2020/07/16 06:07 by 92.220.10.100