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

BASH Scripting Problem 5. Safe Deletion a. Filenames passed as command-line arguments

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

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!