grass
(user)
February 7, 2021, 8:11am
1
I have files with elevated permissions in the thrash folder. Wiping the path with rm
doesn’t seem safe, if some hidden files are stored there.
The most promising solution is this askubuntu.com answer , but I don’t understand what the full command is.
install trash-cli
and execute:
sudo HOME=/home/<hour-home-dir> trash-empty
trash-cli is in the Fedora repos.
UPDATE : Please also consider giving guidance for clearing the trash folders of mounted external drives (in /mnt/backup/.Trash-1000/
, and so).
ersen
(ersen)
February 7, 2021, 8:52am
2
Files in trash is located at $HOME/.local/share/Trash/files
directory (I can’t verify this since I don’t have one right now, but it is what I remember and also mentioned in the answer you linked).
sudo rm "$HOME/.local/share/Trash/files/put-your-filename-here"
grass
(user)
February 7, 2021, 9:10am
3
Neither Nautilus nor ls
lists the same files as displayed in the trash:///
path (as shown in the Nautilus file explorer’s “trash” tab.
ersen
(ersen)
February 7, 2021, 9:35am
4
Does this display anything?
sudo ls -l /root/.local/share/Trash/files
grass
(user)
February 7, 2021, 9:40am
5
ls: cannot access '/root/.local/share/Trash/files': No such file or directory
UPDATE : a mounted drive, the data is stored in /mnt/backup/.Trash-1000/
.
vgaetera
(Vladislav Grigoryev)
February 7, 2021, 11:58am
6
That sounds like a misunderstanding.
Removing hidden files is not different from others.
It should work just fine:
sudo rm -f -R ~/.local/share/Trash /mnt/backup/.Trash-*