Question: How can we implement, as a shell script, a safe delete command, shell.sh. Filesnames passed as command line arguments to this script are not deleted,
How can we implement, as a shell script, a safe delete command, shell.sh. Filesnames passed as command line arguments to this script are not deleted, but instead gripped if not already compressed( use file to check), then moved to a ~/Trash directory. Upon invocation, the script checks the ~/Trash directory for files older than 48 hrs and permanently delete them.( A better alternative might be to have a second script handle this, periodically invoked by the crondaemon.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
