Editing How to create a Recycle Bin (or Trash can) for the CLI rm command
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 7: | Line 7: | ||
==Overview of the Mod== | ==Overview of the Mod== | ||
#Create a directory to hold any deleted files/directories | #Create a directory to hold any deleted files/directories | ||
#Create a directory to store your script which will effectively replace the rm command | #Create a directory to store your script which will effectively replace the rm command | ||
Line 28: | Line 27: | ||
#Enable the Command Line Interface | #Enable the Command Line Interface | ||
#Login to the CLI as root | #Login to the CLI as root | ||
#Change directory to your script folder, e.g. "cd /volume1/my_scripts" | #Change directory to your script folder, e.g. "cd /volume1/my_scripts" | ||
#Use vi to create a script file rm_replacement.sh, e.g. "vi rm_replacement.sh" | #Use vi to create a script file rm_replacement.sh, e.g. "vi rm_replacement.sh" | ||
Line 132: | Line 129: | ||
#minute hour mday month wday who command | #minute hour mday month wday who command | ||
0 0 * * 5 root /usr/sbin/ntpdate -b time.nist.gov | 0 0 * * 5 root /usr/sbin/ntpdate -b time.nist.gov | ||
1 0 * * * root | 1 0 * * * root find /volume1/RecycleBin/ -mtime +7 -type f -exec rm "{}" ";" | ||
</pre> | </pre> | ||
[[Category:SynologyWiki]] | [[Category:SynologyWiki]] | ||
[[Category:ToBeExported]] | [[Category:ToBeExported]] |