6 ms·
hey, that's a very useful trick indeed! i suggest all try it
by kuwoze 4y ago
hey, that's a very useful trick indeed!
i suggest all try it
- nicce 4y agoHe was polite and did not spoil the ultimate trick without tilde character.
- nneonneo 4y agoThe version with the tilde character is worse! At least with the bare slash, some versions of rm will simply refuse to run (they require --no-preserve-root). Plus, even if it works, “rm -rf /“ is likely to start at something like /bin and spew a ton of errors unless you use sudo, giving you ample time to abort before it starts wiping the stuff you care about in /home, /usr, etc. On the other hand, with the tilde, it will just start wiping your personal files right away and will probably not run into any permission errors.
- computomatic 4y ago$ git clone git@github.com:dotfiles '$HOME' Cloning into '$HOME'... *ugh...* $ rm -rf $HOME *wait...* $ cd $HOME cd: no such file or directory: /Users/admin *fuuuuuuuu*