Question
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
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