On Fri, 24 Aug 2007 10:29:06 +0200 Dallman Ross <dman(_at_)nomotek(_dot_)com>
wrote:
On Thu, Aug 23, 2007 at 10:25:12PM -0600, LuKreme wrote:
On 23-Aug-2007, at 15:53, Dallman Ross wrote:
Or if that's no good, you could use find.
rm -f dummy `find ~/mail/backup -maxdepth 1 -type f -name
'msg.*' -mtime +7`
find ~/mail/backup -maxdepth 1 -type f -name 'msg.*' -mtime +7 -
delete
(for any reasonably modern find)
Eh?
10:26am [/var/tmp/.dman] 552[0]> find . -mtime +30 -delete
find: -delete: unknown option
10:26am [/var/tmp/.dman] 553[1]> gfind . -mtime +30 -delete
gfind: invalid predicate `-delete'
[...]
dman
From 'man find' on my system:
ACTIONS
-delete
Delete files; true if removal succeeded. If the removal failed,
an error message is issued. Use of this action automatically
turns on the �-depth� option.
buffy:/# which find
/usr/bin/find
buffy:/# find --version
GNU find version 4.2.28
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION
buffy:~/ttt# touch booboo
buffy:~/ttt# ls -la
total 8
drwxr-xr-x 2 root root 4096 2007-08-24 04:11 .
drwxr-xr-x 5 root root 4096 2007-08-24 04:08 ..
-rw-r--r-- 1 root root 0 2007-08-24 04:11 booboo
buffy:~/ttt# find . -mtime 1 -delete
buffy:~/ttt# ls -la
total 8
drwxr-xr-x 2 root root 4096 2007-08-24 04:11 .
drwxr-xr-x 5 root root 4096 2007-08-24 04:08 ..
-rw-r--r-- 1 root root 0 2007-08-24 04:11 booboo
buffy:~/ttt# find . -mtime 0 -delete
buffy:~/ttt# ls -la
total 8
drwxr-xr-x 2 root root 4096 2007-08-24 04:12 .
drwxr-xr-x 5 root root 4096 2007-08-24 04:08 ..
buffy:~/ttt#
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail