14387 shaares
5333 private links
5333 private links
- Create a new file, e.g.
delrecycle.sh
Enter the following content todelrecycle.sh
:
#!/bin/sh
find /mnt/[MountPoint]/.recycle/* -atime +[Age] -exec rm -rf '{}' \;
find /mnt/[MountPoint]/.recycle/ -depth -type d -empty -exec rmdir {} \;
- Adjust
[MountPoint]
(mount point of your share) and[Age]
(age of the files in days which you want to erase) to your environment and needs. - Upload
delrecycle.sh
to your share. - Create a
cronjob
(System|Advanced|Cron) withroot
– privileges, which calls the command:
sh /path/to/MountPoint/delrecycle.sh