Re:AppleScript: Control Your Mac with an Email
by nicce on Wednesday October 26, 2022 @06:12PM
(#33350289)
He was polite and did not spoil the ultimate trick without tilde character.
[ Parent
| on HN ]
Re:AppleScript: Control Your Mac with an Email
by nneonneo on Wednesday October 26, 2022 @06:27PM
(#33350450)
The 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.
Re:AppleScript: Control Your Mac with an Email
by computomatic on Wednesday October 26, 2022 @06:47PM
(#33350646)
$ git clone [email protected]:dotfiles '$HOME'
Cloning into '$HOME'...
*ugh...*
$ rm -rf $HOME
*wait...*
$ cd $HOME
cd: no such file or directory: /Users/admin
*fuuuuuuuu*