Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Factory Active Database For Enterprise Computing

Authors: Schur, Stephen

1st Edition

0471558443, 9780471558446

More Books

Students also viewed these Databases questions