What happens if you Trash the Trash?
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?
A Trash folder is first created when a user deletes a file. Within that folder are three directories:
-
files
, where the deleted files are stored until the trash is emptied; -
info
, which stores information on where the files once were and when they were deleted; -
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
You can trash files inside the trash (files inside /home/USERNAME/.local/share/Trash/files/
). They will just disappear for a second and then come back to the same Trash folder.
When I tried to trash the Trash folder itself (or its subdirectory "files"), I got an error by Nemo file manager that it got an illegal argument. So this seems not to work (at least not with Nemo).