When I feel like scrapping the whole project and starting over:
Me: (in the project dir) sudo rm -rf /*
Me: (after waiting a while) Something feels off… Why is it taking so long to delete everything?
Me: (suddenly realizing) ^C ^C ^C
System: Press any key to continue…
当我想把整个项目推倒重做时:
我:(在项目目录)sudo rm -rf /*
我:(等了一会儿)有点不对劲。。。怎么删了这么长时间还没删完
我:(恍然大悟)^C ^C ^C
系统: Press any key to continue…
One time I ran rm on a directory and it started deleting files on the NAS mount I had in that directory and forgot about. So note to self: do not mount things inside project directories
I do not understand?
rm -rf /*This deletes everything in root; a great way to break your OS and lose all data too.
OP meant to run
rm -rf ./*Note the period, which represents the current directory. So this deletes everything in the current directory instead of the entire filesystem
Me who wants to remove a system-wide script:
rm -rf /usr/bin /local/script.sh
Yes, the space was an accident, and yes, this did happen 😋
Haha, I’m dying laughing…
`mv folder delete-this
rm -rf delete-this`
gives you one chance to reconsider what you just did before it is too late. And you never have a risk of a dangerous delete-all lurking in your command history.
Why do you need
sudoto run your project? Are you developing kernel drivers?Looking at your avatar, do you play Freedoom? Deadflare from version 0.12. This post is just a joke, don’t take it too seriously.
I don’t play Freedoom regularly, I just like the sprite. I ported it to KaiOS though.
Even then, nothing in the build directory should have unusual permissions.
make && sudo make installor whatever.It’s laziness. A lot of the build stuff is read-only. And as the simple art of
yes | rm -r <folder>is dying,sudois an “easy” way to avoid having to typeYdozens of times.Ope, didn’t know i could do that that safe way.
No biggie. At least you preserved
/. :)Good point, if I do this I can distrohop without worrying of installing anything!
That’s why I always delete in file manager, if I made a mistake I can retrieve it from “waste bin”, can you make some kind of recycle bin for rm command? Nvm I found this after 5 second of online searching https://github.com/babarot/gomi
Idk about gomi, but trash-cli is a standard package I install on all of my computers
.
I feel like I should try this one day if I reset my distro.












