Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question Linux Trash can scripts ***HELP***

    Hi guys.

    I'm new to Linux and I have to create a fully functional Dust bin.
    I have to write 3 scripts to get it work but I don't have a clue where to start. Just started to learn it.
    Any help would be very much appreciated a lot.
    Thank you
    These are the requirements:

    del <filename> - This script should move the file called <filename> to the dustbin directory in a manner that will allow the file to be restored to its original location later if necessary.

    trash [-a] - This script should remove the contents of the dustbin directory.
    If the -a option is used the script should remove ALL files from the dustbin.
    Otherwise, the script should display the filenames in the dustbin one by one and ask the user for confirmation that they should be deleted.

    restore <filename> - This script should move the file called <filename> back to its original directory without requiring any further user input.
    If a file of that name already exists at the restore location, the script prompts the user to select an appropriate alternative action

  2. #2
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Hello and Welcome!

    This has the look of a homework question, which is against our Forum Rules.

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts