coreutils
[Top][All Lists]
Advanced

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

Re: dd: add 'skip_bytes' and 'count_bytes' operands


From: Jérémy Compostella
Subject: Re: dd: add 'skip_bytes' and 'count_bytes' operands
Date: Wed, 8 Feb 2012 17:00:51 +0100

[...]
> > Hmm, that's not too bad at all really
> I do agree, it looks like a very interesting idea indeed. However, I
> have two questions:
> 1. Why skip=2b => 1024 blocks ?
> 2. Do you know if there is a utility function somewhere in coreutils or
> gnulib which could help me to parse this ? If such a function exists it
> could be able to manage more units (bytes, kbytes, megabytes, ...). If
> have to write such a function we have to discuss the possibilities I have to
> provide.
About #2, I was thinking that we could be consistent with the truncate --size
option for example. Adding the missing B for bytes.

truncate --size option documentation extract:
      ‘KB’ => 1000 (KiloBytes)
      ‘K’ => 1024 (KibiBytes)
      ‘MB’ => 1000*1000 (MegaBytes)
      ‘M’ => 1024*1024 (MebiBytes)
      ‘GB’ => 1000*1000*1000 (GigaBytes)
      ‘G’ => 1024*1024*1024 (GibiBytes)
and so on for ‘T’, ‘P’, ‘E’, ‘Z’, and ‘Y’.

Cheers,

Jérémy

reply via email to

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