SlabbeDask wrote:Hello
The "Network Recycle Bin" feature is very nice. But when a NAS is used by many people, it's not always so easy to manage. I can of course empty it, but maybe somone else just deleted a file by mistake?
It would be very cool if we could set it to autodelete files that has been in the recycle bin for a while. The date of a file shown when I look in the recycle bin, is when the file was last modified. I'm not sure if it's possible to find out when it was deleted. If it is, it would be very nice to have some cleanup. For example, every day, permanently delete everything in the recycle bin that has been there for more than a week.
Simply
ssh into the NAS and issue the following command as "admin":
- Code: Select all
find -type f /share/MD0_DATA/Network\ Recycle\ Bin/* -mtime +7 -exec rm {} ;
Once you are satisfied that it works the way you want you can add it to the System "crontab" or "startup" scripts to run as often as desired. (The command above will delete files (whose "modify" time is) older than 7 days old. Adjust as necessary to get the desired effect).
Test this command to ensure it does what you want, as you are explicitly telling it to delete your files. To login to NAS usually requires using
SSH protocol (Secure Shell protocol). If you're a Linux user, 'ssh' is probably already installed; If you are a Windows user, you'll need to provide your own. [Microsoft still does not provide an "ssh" client with Windows]. For those you that are looking for a Secure Shell Windows client you might want to take PuTTY for a spin. Here is a link:
Download PuTTY.