Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 structuresStep 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