3 ms·
I always prepend a # when writing possibly dangerous commands, mostly rm -rf and dd. Started doing it after I wanted to dd an .iso of a distro to my usb drive b
by jwrallie 2y ago
I always prepend a # when writing possibly dangerous commands, mostly rm -rf and dd. Started doing it after I wanted to dd an .iso of a distro to my usb drive but accidentally my main drive.
It can help if you press enter instinctively after finishing writing the command, and also against fat fingering an incomplete but valid command.
- eitland 2y agoI've done it too, but probably not as consistent as you.
- mook 2y agoI like to prefix it with `echo` so I can see what it's trying to run, especially when wildcards are involved. Or things like `find`.
- hinkley 2y agoEcho is also very good for chaining with xargs to make sure you didn’t fuck up.