Ubuntu – What happens if you Trash the Trash

deletefilestrash

I was just wondering what would happen if I went and moved the Trash located here:

/home/neo/.local/share/Trash

To my Trash? I mean if I go to that folder and right-click on the contents and tell it to move it to the Trash.

  • What would happen as it would be trying to move itself inside itself?
  • Is there another Trash it would move it into?
  • And if so, what if I also Trashed that one?

Best Answer

A Trash folder is first created when a user deletes a file. Within that folder are three directories:

  1. files, where the deleted files are stored until the trash is emptied;
  2. info, which stores information on where the files once were and when they were deleted;
  3. expunged, to which files are briefly moved when the trash is emptied (but may contain some owned by other users from directories you deleted).

So whenever you delete a trash indeed you are calling recursively to create a new dir for the newly trashed files.

Also note that Trash exists for every user including the root account plus sometimes you could face some dirs names such as Trash-0 , Trash-1. Read my answers here and here

Related Question