User Tools

Site Tools


ubuntu:find:find_and_delete_files_after_a_certain_time

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
ubuntu:find:find_and_delete_files_after_a_certain_time [2020/07/15 09:30] – external edit 127.0.0.1ubuntu:find:find_and_delete_files_after_a_certain_time [2022/06/13 08:36] (current) – removed peter
Line 1: Line 1:
-====== Ubuntu - Find - Find and delete files after a certain time ====== 
  
-<code bash> 
-find /path/to/folder -type f -name "<regex-for-file-name>" -mtime +<number-of-days> -exec <bash-command> {} \; 
-</code> 
- 
-Example usage: 
- 
-<code bash> 
-find /var/spool/somedir/someotherdir -type f -name "msg*" -mtime +30 -exec rm {} \; 
-</code> 
ubuntu/find/find_and_delete_files_after_a_certain_time.1594805433.txt.gz · Last modified: 2020/07/15 09:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki