Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started