Announcement

Collapse
No announcement yet.

recycle bin in console

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    recycle bin in console

    Hi,

    I would like how could I do that when I delete a file from command-line with rm the file goes to the recycle bin.

    Many thanks and sorry for my english!

    #2
    Re: recycle bin in console

    If you review
    Code:
    man rm
    you will not see such a capability.

    The recycle "bin" is really just a filesystem directory. For each user, it is located under the user's home directory, under the hidden .local/share/Trash/files directory. So mine is at:

    Code:
    dibl@ibex:~/.local/share/Trash/files$
    Therefore, what is actually happening when you use the graphical "send to trash" is not a rm, or remove (aka "delete"), but actually a mv, or move. So the CLI equivalent of right-clicking on a file named "foo" that is located in your user folder and executing "send to trash" would be
    Code:
    mv foo .local/share/Trash/files/foo

    Comment


      #3
      Re: recycle bin in console

      Thanks!

      Comment

      Working...
      X