Re: [PLUG] Script not working as intended [FIXED]

2019-12-16 Thread Rich Shepard
On Sun, 15 Dec 2019, Rich Shepard wrote: Yesterday I put this command in root's crontab: 20 1 * * * find /tmp -mtime +7 -type f -exec rm -f { } ';' Fixed by removing the whitespace between the two braces. I should have caught -- even avoided -- that error. Rich

Re: [PLUG] Script not working as intended

2019-12-16 Thread Rich Shepard
On Mon, 16 Dec 2019, Thomas Groman wrote: Your line can be greatly simplified by just using: find /tmp -type f -mtime +60 -delete Thanks. Rich ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug

Re: [PLUG] Script not working as intended

2019-12-16 Thread Thomas Groman
Your line can be greatly simplified by just using: find /tmp -type f -mtime +60 -delete ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug

Re: [PLUG] Script not working as intended

2019-12-15 Thread Robert Citek
Four recommendations for troubleshooting: 1) use a test command that is not so destructive when it fails 2) log output 3) run it more frequently 4) include a positive control entry that you know should work and a negative control that you know won't For example, replace your original command:

Re: [PLUG] Script not working as intended

2019-12-15 Thread John Meissen
On 12/15/19 6:22 AM, Rich Shepard wrote: Yesterday I put this command in root's crontab: # remove all files in /tmp not modified in 7 days daily at 1:20 20 1 * * * find /tmp -mtime +7 -type f -exec rm -f { } ';' It is not working as I expected since there are files in /tmp as old as last

[PLUG] Script not working as intended

2019-12-15 Thread Rich Shepard
Yesterday I put this command in root's crontab: # remove all files in /tmp not modified in 7 days daily at 1:20 20 1 * * * find /tmp -mtime +7 -type f -exec rm -f { } ';' It is not working as I expected since there are files in /tmp as old as last August. There are also old directories not