On Sun, Jun 8, 2014 at 4:03 AM, Sharon Kimble <boudic...@skimble.plus.com> wrote: > > Revisiting a question that I asked in March last year about how to > auto-empty a trash bin. > > This has worked very well until today, when on one of my drives it > also deleted the trash bin as well, so my follow-on script to give > me the size of my trash bin failed as there wasn’t a trash bin to > evaluate! > > Here is the script lines - > --8<---------------cut here---------------start------------->8--- > find /media/boudiccas/back2/.Trash-1000 -type f -mtime +"$days" -delete; > find /media/boudiccas/back2/.Trash-1000 -depth -type d -exec rmdir > --ignore-fail-on-non-empty {} +; > --8<---------------cut here---------------end--------------->8---
Use "-mindepth 1": [localhost:/home/th/Public]$ find . . [localhost:/home/th/Public]$ find . -mindepth 1 [localhost:/home/th/Public]$ -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/CAOdo=SxcHvqb=sopcdrvjsjpodyhqn0xvmsoipiau1vs6qe...@mail.gmail.com