D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Safe DDing

 

On 27/01/19 10:44, Gordon Henderson wrote:
> On Sun, 27 Jan 2019, Tom via list wrote:
>
>> I've just spent two days rebuilding my laptop after inadvertently dd ing
>> a microsd image onto the main drive - I think in bash I managed to
>> accidentally somehow unedit the command and launch it ( I hate touchpads!)
>>
>> I was wondering if anyone has got an app that can realise this is a
>> stupid thing to do and stop you?
>
> With great power comes great responsibility...
>
> Gordon
>
Alias 'dd' to something else? perhaps a bash script that says "Hey you
stupid oaf, do you really want to overwrite your hard disk?!" .. or better
still, does a basic sanity check on the disk before actually running
/sbin/dd .... XD
(there are device files which say whether a device is deemed 'removable' or
not (although this can apply to USB disks, etc etc)

Best,

Michael.

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
The Mailing List for the Devon & Cornwall LUG
https://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq