1 .\" $NetBSD: progress.1,v 1.10 2006/01/12 20:33:20 garbled Exp $
3 .\" Copyright (c) 2003,2004 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
17 .\" 3. Neither the name of The NetBSD Foundation nor the names of its
18 .\" contributors may be used to endorse or promote products derived
19 .\" from this software without specific prior written permission.
21 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
22 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
25 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 .\" POSSIBILITY OF SUCH DAMAGE.
38 .Nd feed input to a command, displaying a progress bar
50 utility opens a pipe to
52 and feeds an input stream into it, while displaying a progress bar to
54 If no filename is specified,
56 reads from standard input.
60 the input to determine the length, so a time estimate can be calculated.
62 If no length is specified or determined,
64 simply displays a count of the data and the data rate.
66 The options are as follows:
67 .Bl -tag -width XlXlengthXX
69 Display progress to standard error instead of standard output.
71 Read from the specified
73 instead of standard input.
75 Use the specified length for the time estimate, rather than attempting to
78 An optional suffix (per
84 text before (left of) the progress bar.
86 Filter the input through
90 is specified, calculate the length using
98 .Dl progress -zf file.tar.gz tar xf -
101 displaying the progress bar as time passes:
103 0% | | 0 0.00 KB/s --:-- ETA
104 40% |********** | 273 KB 271.95 KB/s 00:01 ETA
105 81% |************************* | 553 KB 274.61 KB/s 00:00 ETA
106 100% |*********************************| 680 KB 264.59 KB/s 00:00 ETA
109 If it is preferred to monitor the progress of the decompression
110 process (unlikely), then
111 .Dl progress -f file.tar.gz tar zxf -
115 .Dl dd if=/dev/rwd0d ibs=64k | \e
116 .Dl progress -l 120g dd of=/dev/rwd1d obs=64k
117 will copy the 120 GB disk
123 displaying a progress bar during the operation.
131 The dynamic progress bar display code is part of
137 .Aq jhawk@NetBSD.org .
139 dynamic progress bar was written by Luke Mewburn.
141 Since the progress bar is displayed asynchronously, it may be
142 difficult to read some error messages, both those produced by the
143 pipeline, as well as those produced by