На freebsd было так find /share/Recordings/ -name «*.bz2» -mtime +7 -delete и бекапы старше 7 дней удалялись
Но поал ко мне в руки NAS QNAP где ругается на -delete
Как удалить старые файлы по крону?
[/share/Recordings] # find /share/Recordings/ -name «*.bz2» -mtime +7 -delete
BusyBox v1.01 (2012.07.14-18:37+0000) multi-call binary
Usage: find [PATH...] [EXPRESSION]
Search for files in a directory hierarchy. The default PATH is the current directory; default EXPRESSION is '-print'
EXPRESSION may consist of:
-follow Dereference symbolic links.
-name PATTERN File name (leading directories removed) matches PATTERN.
-print Print (default and assumed).
-type X Filetype matches X (where X is one of: f,d,l,b,c,...)
-perm PERMS Permissions match any of (+NNN); all of (-NNN); or exactly (NNN)
-mtime TIME Modified time is greater than (+N); less than (-N); or exactly (N) days
[/share/Recordings] #