Re:Don't touch my clipboard
by dan_hawkins on Tuesday February 18, 2020 @10:45AM
(#22356816)
`rm -rf ~` is disastrous enough on macOS with a bonus of not having to authentiacate sudo.
[ Parent
| on HN ]
Re:Don't touch my clipboard
by diegoperini on Wednesday February 19, 2020 @04:01AM
(#22364028)
How do people know the result of running this command without running a VM? Is it possible to run OS X in a VM these days?
The command's intention is so obvious I wonder why there is no warning from the os, the shell program or the terminal for such, easily blacklist-able commands. Or is there?
Re:Don't touch my clipboard
by dan_hawkins on Wednesday February 19, 2020 @05:47AM
(#22364472)
I've learned that personally one night fighting messed up rebase conflicts and for still unknown reason I copied and pasted a path for `rm` and ended up issuing `rm -rf ~ /repo-path /unneeeded-dir` - it took me a couple of seconds to realize that this command takes unexpected long time to execute and then my eye caught a view of Finder window with shrinking list of folders in home directory :) Time Machine helped me quite a lot but unfortunately with a nasty surprise that it doesn't backup dot files :-/ Lessons learned.
Re:Don't touch my clipboard
by dan_hawkins on Wednesday February 26, 2020 @08:49AM
(#22422826)
PS: it turns out you can restore dot files from the Time Machine backups but it's not enabled by default:
https://apple.stackexchange.com/questions/141321/how-to-rest...