Question: BASH Scripting Problem 5. Safe Deletion a. Filenames passed as command-line arguments to this script are not deleted, but instead gzipped if not already compressed
BASH Scripting Problem

5. Safe Deletion a. Filenames passed as command-line arguments to this script are not deleted, but instead gzipped if not already compressed (use file command to check), then moved to a ~/TRASH directory b. If any of the arguments do not exist or is not a regular file output an error message c. Upon invocation, the script checks the ~/TRASH directory for files older than 48 hours and permanently deletes them. d. ADVANCED - Write the script so it can handle files and directories recursively. This would give it the capability of "safely deleting" entire directory structures
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
