Thu 28 Jan 21 in Coding

Bash - Delete files older than

#Snippets

Search for files, and automatically remove them


find /home/files/* -mmin +[ minutes ] -exec rm {} \;

 

Find files older than 12 hours, and remove them


find /home/files/* -mmin +720 -exec rm {} \;