Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
/ 2006-06-21 16:30:35 +0200 \ Regis Gras: > Lars Ellenberg wrote: > > >since the sda6 is a multiple of 4kB, too, > >we don't need to round down the offset. > >so I'd say, to wipe out the meta data, you do > > > >perl -e '$offset = sysseek STDOUT, -(128*1024*1024), 2; > > die unless $offset == 58538276*1024; > > $zero = "\x00" x 1024; > > syswrite(STDOUT,$zero) == 1024 or warn "oops? $!"; > > ' > /dev/sda6 > > Thak you very much for your help. > > I do'nt well known Perl, but I understand what you write. > > But this script doesn't work. > > [dionysos]-root# perl -e '$offset = sysseek STDOUT, -(128*1024*1024), 2; > >die unless $offset == 58538276*1024; > >$zero = "\x00" x 1024; > >syswrite(STDOUT,$zero) == 1024 or warn "oops? $!"; > >' > /dev/sda6 > Died at -e line 2. try die "$!\n" instead... sysseek returns the new position, or the undefined value if the seek did not work. maybe dd does work, instead? dd if=/dev/zero bs=1024 seek=58538276 count=1 of=/dev/sda6 -- : Lars Ellenberg Tel +43-1-8178292-0 : : LINBIT Information Technologies GmbH Fax +43-1-8178292-82 : : Schoenbrunner Str. 244, A-1120 Vienna/Europe http://www.linbit.com : __ please use the "List-Reply" function of your email client.