xluffy / til

You only feel happy when you know what you doing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

find and remove

xluffy opened this issue · comments

commented
/usr/bin/find /data/backups/ -mtime +7 -exec rm -rvf '{}' +

or

/usr/bin/find /data/backups/ -mtime +7 -exec rm -rvf '{}' \

The + at the end will result in rm -rv file1 file2 ... while action of \; will be rm -rv file1; rm -rv file2; ..