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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!