5
votes
7answers
2k views

Is the command `sudo rm /Desktop/filename` safe?

Is this safe to use? sudo rm /Desktop/FILENAME The reason for wanting to use sudo is I can't see the file. I accidentally typed in sudo rm /Desktop/index.html. It didn't find it but could ...
2
votes
1answer
57 views

Aliased rm, how do I also alias sudo rm

I aliased rm to a echo use del or full path to rm to save myself from accidental rm (just lost my $HOME to it). But sudo rm still uses /bin/rm. How can I alias it to also print same message? PS: del ...
2
votes
2answers
1k views

“sudo rm” fails to delete files

My main account is called "u1204" and I have some files created with another account called "dad": $ find . -user dad -print ./Documents/Zim Notes/.zim/state.conf ./Documents/Zim Notes ...
9
votes
1answer
6k views

rm: cannot remove `/run/user/root/gvfs': Is a directory

Whenever I type a command which is similar to sudo apt-get install or anything like this I get this kind of error: $ sudo su # exit exit rm: cannot remove `/run/user/root/gvfs': Is a directory How ...
3
votes
2answers
2k views

I cannot delete files from root's Trash

I deleted some large files from nautilus launched as sudo. They still show in /home/.Trash-0/files/<foldername> when I type sudo sh -c "du -h /home | grep -P '[0-9]G\t'" but when I type sudo rm ...
3
votes
2answers
3k views

Difference between sudo rm -rf and rm -vf?

Recently I have seen one issue with a cache problem. The problem comes with broken hash and that could be fixed with sudo rm -rf /var/lib/apt/lists/* and sudo rm /var/lib/apt/lists/* -vf But I ...
3
votes
2answers
884 views

how to restore boot folder?

No laughing! I just did sudo rm -vr /boot/*. Is there a way to restore the content? Just to clarify why I would do this: I have a SD-card with a boot-partition mounted at /media/boot that I wanted ...
2
votes
2answers
548 views

rm -i alias not working with sudo as root

I have noticed in all my Ubuntu servers the alias rm -i is ignored when you run sudo rm * as root. Is there something in sudo that is causing this behavior? I know you don't need to use sudo when you ...