bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ddrescue] Appending zeroes by seek is not working


From: Pavel Roskin
Subject: Re: [Bug-ddrescue] Appending zeroes by seek is not working
Date: Thu, 18 Dec 2014 10:56:28 -0500

Hello Antonio,

On Thu, Dec 18, 2014 at 10:58 AM, Antonio Diaz Diaz <address@hidden> wrote:
> Pavel Roskin wrote:
>>
>> I hope you know that dd creates an empty file when it's asked to copy
>> zero bytes, and least on GNU/Linux.
>>
>> dd if=/dev/zero of=foo bs=1M count=0 seek=1
>
>
> In fact, unless 'conv=notrunc' is given, 'dd' truncates foo to zero bytes
> (or the size specified with 'seek'). And you do not want ddrescue to trucate
> outfile, right?

You are right, I omitted conv=notrunc. I actually used it when I
needed to extend an existing file.

> Your suggestion would also extend outfile when a position is given beyond
> the end of infile, what is not desired either.
>
>
>> I don't see anything wrong with "Nothing to do", even without "Empty
>> domain". Except that both imply that copying data is the main purpose
>> of ddrescue and extending the file is a minor preparation job that can
>> be omitted if not needed. If "ddrescue" was written with that
>> mentality and nobody except me sees that as an unpleasant surprise, I
>> guess I should just accept it and use dd for extending files without
>> copying.
>
>
> Right. Ddrescue is designed to copy data as safely as possible in the worst
> conditions, and in particular to only extend or write to the output file
> when there is something useful to copy. I guess dd is the right tool for
> extending files without copying.

OK then.

-- 
Regards,
Pavel Roskin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]