coreutils
[Top][All Lists]
Advanced

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

Re: using dd to prepare a file to be written to memory blocks(remove pad


From: Justin Mattock
Subject: Re: using dd to prepare a file to be written to memory blocks(remove padding)
Date: Wed, 8 Aug 2012 17:14:47 -0700

On Wed, Aug 8, 2012 at 4:34 PM, Pádraig Brady <address@hidden> wrote:
> On 08/09/2012 12:08 AM, Justin Mattock wrote:
>> im not on the list so please cc's me, and if this is the wrong list
>> for this question then let me know so I may find the right one
>> to find info.
>>
>> what are the tools to _prepare_ a file to be uploaded to memory(right
>> now im using dd)? is there a way to not pad a file? or keep the size
>> of the file without adding any padding to it so the size stays where
>> it needs to be, but the info inside is aligned from start to finish
>> without zero?
>>
>> bassically what im looking at:
>> fixed block(partition) = 9,504kb
>> file that needs to be uploaded to partition = 9,216
>> file padding = 288kb (how to remove this in the end of the file?)
>>
>> is there a program that is capable of stretching the file(9,216) so it
>> fits the partition of 9,504 or am I totally doing things wrong?
>
> I don't understand what you mean exactly.
>
> If you want to write data to a particular part of a file,
> look at the conv=notrunc and seek=BLOCKS options.
> If you want to handle zero blocks in the input specially,
> note the conv=sparse option added in version 8.16
>
> cheers,
> Pádraig.

cool! thanks for the info.. I will look into conv=sparse etc..
as to make sense with what im doing
I have a fixed partition that needs to have the file aligned to its
size before it can write to it, then once I write to it
I need to have no padding in the file.
from what I can see so far(might be wrong).

rough view:
fixed block partition size = 9,504
file size to be uploaded to fixed partition = 9,216
remaining size is = 288(padding)

I need to see if I can keep the file at 9,504(so the app will upload
to the partition)
but insert data of 9,216 but not have whitespace in the file(padding)

in any case I appreciate the response and will look into what you are saying.

-- 
Justin P. Mattock



reply via email to

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