+1
On Mon, Dec 16, 2019 at 10:31 AM Thomas Groman
wrote:
> 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
>
_
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
___
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
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
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:
20
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
Au
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 modif