Where is Trash directory located on Linux

FREQUENTLY ASKED QUESTIONS (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/
video.avi
[root@server Trash]# ls info/
video.avi.trashinfo

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

[Trash Info]
Path=/home/admin/Videos/video.avi
DeletionDate=2012-09-10T13:58:13


1 comments:

Unknown 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