bash:find:find_and_delete_files_after_a_certain_time
BASH - 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 {} \;
bash/find/find_and_delete_files_after_a_certain_time.txt · Last modified: 2022/06/13 08:35 by peter