[Top][All Lists]

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

Progress reporting in dd, take 3

From: Leon Brooks
Subject: Progress reporting in dd, take 3
Date: Thu, 31 Jul 2003 01:01:15 +0800
User-agent: KMail/1.5

The attached diff -dc against dd from fileutils 4.0.36 produces progress 
reporting with dd; the syntax to invoke it is:


"mode" can be one of none (the default), count, percentage, hashes; `%' 
and `#' are allowed sysnonyms. If the total size of the copy is not 
known, but a mode other than count is chosen, the mode reverts to count 
(since both other methods *need* to know how big the copy is).

The patch is mostly an amalgamation of Eric Thomas' from late January 
and Bob Proulx's in late April. I haven't patched the tex.

Parsing of the mode is very simple: anything starting with `n' is none,
anything starting with `%' or `p' is percentage, anything starting with 
`#' or `h' is hashes, anything else is count.

It's not perfect, but it works and it's upwards compatible with the 
existing methods. Please consider applying it to see what happens in 
the field.

If it gets a positive response I'll bother documenting and refining it 
(for example, it would be easy to add a mode flag asking it to spawn 
hdparm on the input device to discover how many blocks are coming 
before it starts (making `%' and `#' useful automagically for 
disk-to-disk copies), easy to add a mode flag aimed at making the 
progress output more parser-friendly, and/or easy to add a 

The inspiration for the patch was starting a dd across unoptimised IDE 
drives which (it turned out) were pulling a massive 3.6 megabytes a 
second (now 56MB/s). It would in reality have taken over 10 hours to 
complete and I had no way of knowning that until I killed it.

Please CC me any replies since I'm already drowning in lists.

Cheers; Leon

http://cyberknights.com.au/     Modern tools; traditional dedication
http://plug.linux.org.au/       Committee Member, Perth Linux User Group
http://slpwa.asn.au/            Committee Member, Linux Professionals WA
http://linux.org.au/            Committee Member, Linux Australia

reply via email to

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