andreafrancia / trash-cli

Command line interface to the freedesktop.org trashcan.
GNU General Public License v2.0
3.63k stars 177 forks source link

how can I trash-list with sudo? #142

Open braindevices opened 5 years ago

braindevices commented 5 years ago

I have files have been sudo trash How can I show those files? If I do sudo trash-list it will say TrashDir skipped because parent not sticky: .../.Trash/0

after I did sudo -i. My id change to 0. In theory I should be able to trash-list the .Trash/0, but it does not

gebangfeng commented 4 years ago

I also met this question, there is no big guy can answer.

KSR-Yasuda commented 4 years ago

Why don't you just set sticky bit? (chmod 1777 .Trash)

As Trash specification, .Trash dir must be set sticky bit, and accessible by all the users. Also see the issue #108.

In my environment, if available trash dir does not exist, trash v0.17.1.14 uses .Trash-$UID. Unsticky .Trash dir is considered unavailable, and .Trash-$UID is chosen instead.

I think trash v0.17.1.14 does at least follow the spec not to use unsticky .Trash.