Find the answer to your Linux question:
Results 1 to 4 of 4
I want to know how recycle bin work?! um..mm if I use rm command to delete some files and I also need my deleted files go through recycle bin ... ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2006
    Posts
    9

    about "rm" command and recycle bin


    I want to know how recycle bin work?!

    um..mm if I use rm command to delete some files and I also need my deleted files go through recycle bin ... ,impossible huh !?!

  2. #2
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    Location
    Earth
    Posts
    3,379
    recycle bin is just for when you press DEL in your file manager, rm is to permenantly remove it like you found. I don't think there is any way to tell rm to send stuff to a "recycle bin" of sorts.
    Life is complex, it has a real part and an imaginary part.

  3. #3
    d0p
    d0p is offline
    Just Joined!
    Join Date
    Jul 2005
    Posts
    60
    if you want a "recycle bin" you could do

    $ mkdir /trash

    then use

    $ mv /stuff/to/delete /trash/


    rm is for permenant deletion

    you may want to read the Debian (or the many other) user guides to become familiar w/ all the beauty contained within linux

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer
    Join Date
    Mar 2005
    Posts
    1,431
    This is for the gnome trash, I'm not sure where KDEs trash is located... But put this somewhere in your users ~/.bashrc:
    Code:
    alias rm='mv --target-directory ~/.Trash'
    If you now rm a file or directory as that user, it should go to trash. Beware that you have to re-login first!

Posting Permissions

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