-.\" $NetBSD: progress.1,v 1.6 2004/03/09 17:04:24 hubertf Exp $
+.\" $NetBSD: progress.1,v 1.11 2006/01/12 21:52:01 wiz Exp $
.\"
-.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2003,2004 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd March 5, 2004
+.Dd January 12, 2006
.Dt PROGRESS 1
.Os
.Sh NAME
.Nd feed input to a command, displaying a progress bar
.Sh SYNOPSIS
.Nm
-.Op Fl z
+.Op Fl ez
.Op Fl f Ar file
.Op Fl l Ar length
.Op Fl p Ar prefix
.Pp
The options are as follows:
.Bl -tag -width XlXlengthXX
+.It Fl e
+Display progress to standard error instead of standard output.
.It Fl f Ar file
Read from the specified
.Ar file
Use the specified length for the time estimate, rather than attempting to
.Xr fstat 2
the input.
+An optional suffix (per
+.Xr strsuftoll 3 )
+may be given.
.It Fl p Ar prefix
Print the given
.Dq prefix
-text before (left of) the progress bar.
+text before (left of) the progress bar.
.It Fl z
Filter the input through
-.Xr gzip 1 .
+.Xr gunzip 1 .
If
.Fl f
is specified, calculate the length using
exits 0 on success.
.Sh EXAMPLES
The command
-.Ic progress -zf file.tar.gz tar xf -
+.Dl progress -zf file.tar.gz tar xf -
will extract the
.Pa file.tar.gz
displaying the progress bar as time passes:
.Pp
If it is preferred to monitor the progress of the decompression
process (unlikely), then
-.Ic progress -f file.tar.gz tar zxf -
+.Dl progress -f file.tar.gz tar zxf -
could be used.
+.Pp
+The command
+.Dl dd if=/dev/rwd0d ibs=64k | \e
+.Dl progress -l 120g dd of=/dev/rwd1d obs=64k
+will copy the 120 GB disk
+.Sy wd0
+.Pa ( /dev/rwd0d )
+to
+.Sy wd1
+.Pa ( /dev/rwd1d ) ,
+displaying a progress bar during the operation.
.Sh SEE ALSO
-.Xr ftp 1
+.Xr ftp 1 ,
+.Xr strsuftoll 3
.Sh HISTORY
.Nm
first appeared in