3 ms·
> and accidentally overwriting their main drive instead because they mangled /dev/sda instead of /dev/sdb One trick to be sure that you've typed correctly, sta
by zenlot 6y ago
> and accidentally overwriting their main drive instead because they mangled /dev/sda instead of /dev/sdb
One trick to be sure that you've typed correctly, start with 'echo':
# echo dd if=xxx of=yyy [enter]
This way you'll be able to check that command will be executed with the parameters you want. Especially helpful if you're running loops, e.g:
# for i in xxx; do echo yyy; done
I would never use GUI for that, as you can't be sure what it will execute, no matter what it shows.
- Kwpolska 6y agoHow would `echo dd if=linux.iso of=/dev/sda` protect you from nuking the wrong drive? To be sure you aren’t overwriting the wrong drive, you need to read the command before executing it — and you don’t need echo for that, just pause for a second before hitting Enter — and you need to know which drive is which, and that requires running a different command, or using eg. /dev/disk/* instead of /dev/sd??.
- deleted 6y ago[deleted]