Where is Trash directory located on Linux

Q: Where is Trash folder location or path in linux?

  You can find the Trash (Recycle Bin) directory under the ".local/share/Trash/" location. And there will be two directories named "info" and "files", where "info" includes a "filename.trashinfo" file that includes the original file location and deleted date and time of all trashed files. "files" directory includes the full and original deleted files.
You can read and modify the trashed items/files also. And you can empty trash or delete files from trash using normal "rm" command in command line.
Please Note: This Trash directory only created when you delete a file to trash folder first.

Accessing Trash Directory Command line
Applicable to: RHEL, Redhat, CentOS, Ubuntu, Debian, Fedora, etc. 
[root@server ~]# cd ~/.local/share/Trash/
[root@server Trash]# ls
files   info

[root@server Trash]# ls files/
[root@server Trash]# ls info/

[root@server Trash]# cat info/video.avi.trashinfo

[Trash Info]

Was this helpfull ?


Surendra K Yelavarthi said...

Nice information.
The folder might not exist unless you delete something from the filesystem. So you will see the error: folder does not exist

Related Posts Plugin for WordPress, Blogger...

Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Coupons