I was unable to empty my trash so I used the below command:
sudo rm -rf ~/.local/share/Trash/*
and it deleted everything from all the directories, home and downloads
Can any one please help?
I was unable to empty my trash so I used the below command:
sudo rm -rf ~/.local/share/Trash/*
and it deleted everything from all the directories, home and downloads
Can any one please help?
The command sudo rm -rf ~/.local/share/Trash/*
will only remove the contents of your local Trash directory. Additionally, for future reference, deleting your own user trash does not require sudo privileges.
Your $HOME
files structure may indeed be deleted as you say, but the command you posted wouldn't do that.
first don't run the system to avoid overwriting data. boot from a live CD extundelete is a good program for recovering files by reading inodes.
Run a liveCD / USB and mount the partition containing your lost files as readonly. ex. If your /home partition is on sda2, execute these commands:
mkdir ~/recovery/
sudo mount -o ro /dev/sda2 ~/recovery/
Recover your user directory and all it's contents:
sudo extundelete /dev/sda2 --restore-directory /home/username/
sudo rm -rf ~/ .local/share/Trash/
. Note the space between~/
and.local
. That would delete your home directory. – wjandrea Jun 17 '17 at 00:02