Find the answer to your Linux question:
Results 1 to 3 of 3
Hello everyone, I have created a Recycle Bin using 3 commands by doing Shell Scripting. I was wondering is there anything I can do to improve the current Scripts or ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2012
    Posts
    2

    Thumbs up Recycle Bin using Delete,Trash & Restore Shell Scripting.


    Hello everyone,

    I have created a Recycle Bin using 3 commands by doing Shell Scripting. I was wondering is there anything I can do to improve the current Scripts or whether I am missing anything in it which could be of good use??

    Thanks!

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Hi and Welcome !

    I haven't tested your scripts yet but what if you try to delete a file/ folder that doesn't exist? Have you taken care of that?
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Nov 2012
    Posts
    2

    Lightbulb Thanks for your reply Devils!

    Quote Originally Posted by devils casper View Post
    Hi and Welcome !

    I haven't tested your scripts yet but what if you try to delete a file/ folder that doesn't exist? Have you taken care of that?
    When I delete a file/directory, which doesn't exist. it comes up as..

    Code:
    # del c
    Are you sure you want to move this file to the Recycle Bin? (Yes/No)
    y
    mv: cannot stat 'c' : No such file or directory
    #

  4. $spacer_open
    $spacer_close

Posting Permissions

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