1 .\" $NetBSD: progress.1,v 1.13 2007/06/06 17:49:14 briggs Exp $
3 .\" Copyright (c) 2003-2007 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.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
35 .Nd feed input to a command, displaying a progress bar
39 .Op Fl b Ar buffersize
48 utility opens a pipe to
50 and feeds an input stream into it, while displaying a progress bar to
52 If no filename is specified,
54 reads from standard input.
58 the input to determine the length, so a time estimate can be calculated.
60 If no length is specified or determined,
62 simply displays a count of the data and the data rate.
64 The options are as follows:
65 .Bl -tag -width XlXlengthXX
66 .It Fl b Ar buffersize
67 Read in buffers of the specified size (default 64k).
68 An optional suffix (per
72 Display progress to standard error instead of standard output.
74 Read from the specified
76 instead of standard input.
78 Use the specified length for the time estimate, rather than attempting to
81 An optional suffix (per
87 text before (left of) the progress bar.
89 Filter the input through
93 is specified, calculate the length using
101 .Dl progress -zf file.tar.gz tar xf -
104 displaying the progress bar as time passes:
106 0% | | 0 0.00 KiB/s --:-- ETA
107 40% |******** | 273 KiB 271.95 KiB/s 00:01 ETA
108 81% |*********************** | 553 KiB 274.61 KiB/s 00:00 ETA
109 100% |*******************************| 680 KiB 264.59 KiB/s 00:00 ETA
112 If it is preferred to monitor the progress of the decompression
113 process (unlikely), then
114 .Dl progress -f file.tar.gz tar zxf -
118 .Dl dd if=/dev/rwd0d ibs=64k | \e
119 .Dl progress -l 120g dd of=/dev/rwd1d obs=64k
120 will copy the 120 GiB disk
126 displaying a progress bar during the operation.
134 The dynamic progress bar display code is part of
140 .Aq jhawk@NetBSD.org .
142 dynamic progress bar was written by Luke Mewburn.
144 Since the progress bar is displayed asynchronously, it may be
145 difficult to read some error messages, both those produced by the
146 pipeline, as well as those produced by