Question: using Oracle VM virtual box Ubuntu As you know, the rm command deletes files. But - it doesn't use a waste basket approach to allow

using Oracle VM virtual box Ubuntu using Oracle VM virtual box Ubuntu As you know, the "rm" command

As you know, the "rm" command deletes files. But - it doesn't use a "waste basket" approach to allow you to undelete things - it doesn't delete directories (you need rmdir to delete an empty directory) Create a script called "de lete. sh" which will take a single argument - the script should complain (give an error message) if the user has given more than one argument - it should automatically use the correct command depending on whether the argument is a file or a directory - any deleted file should be placed in a directory / wasteba sket Some possible enhancements you might want to try - if the argument is a non-empty directory then it should refuse to delete (or perhaps ask for confirmation). - if the filename you are deleting already exists in /wastebas ket then ... well you decide what is sensible - write an "undelete. sh" script

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!