Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is UNIX based question: Here, you will write a script named saferm. Its job will be to place a copy of a file into

This is UNIX based question:

Here, you will write a script named saferm. Its job will be to place a copy of a file into a holding directory before deleting it (sort of like the recycle bin concept).

Here is what the script must do:

1. Take one and only one argument at the command line.

Print out an error message if no argument or more than one arguments are provided. Exit the script.

2. Check for the existence of a directory named safermrecycle in your home directory.

If the directory does not exist, create it.

3. Check the argument to be sure that it is a file.

Print out an error message if the argument is not a file. Exit the script.

4. Copy the file indicated by the first argument to this safermrecycle folder.

5. Delete the file.

Check the operation of your script to be sure it works successfully.

Download your script from your server. You may additionally provide any documentation of its operation and how you achieved the solution in a separate Word document.

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

Step: 3

blur-text-image

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

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

6. Be able to choose and prepare a training site.

Answered: 1 week ago