X-Git-Url: https://git.cameronkatri.com/bsd-progress.git/blobdiff_plain/65eda58c8954bab4cb7dbb1e0632d468ae7eb171..c3cbd3311842130ff3f210cdf3288820b7dc9f4f:/progress.1?ds=sidebyside diff --git a/progress.1 b/progress.1 index 4e9594c..028bda9 100644 --- a/progress.1 +++ b/progress.1 @@ -1,6 +1,6 @@ -.\" $NetBSD: progress.1,v 1.7 2004/03/09 19:04:09 wiz Exp $ +.\" $NetBSD: progress.1,v 1.15 2014/04/13 01:45:34 snj Exp $ .\" -.\" Copyright (c) 2003 The NetBSD Foundation, Inc. +.\" Copyright (c) 2003-2007 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -14,9 +14,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -30,7 +27,7 @@ .\" 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 June 6, 2007 .Dt PROGRESS 1 .Os .Sh NAME @@ -38,7 +35,8 @@ .Nd feed input to a command, displaying a progress bar .Sh SYNOPSIS .Nm -.Op Fl z +.Op Fl ez +.Op Fl b Ar buffersize .Op Fl f Ar file .Op Fl l Ar length .Op Fl p Ar prefix @@ -65,6 +63,13 @@ simply displays a count of the data and the data rate. .Pp The options are as follows: .Bl -tag -width XlXlengthXX +.It Fl b Ar buffersize +Read in buffers of the specified size (default 64k). +An optional suffix (per +.Xr strsuftoll 3 ) +may be given. +.It Fl e +Display progress to standard error instead of standard output. .It Fl f Ar file Read from the specified .Ar file @@ -73,40 +78,54 @@ instead of standard input. 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. .It Fl z Filter the input through -.Xr gzip 1 . +.Xr gunzip 1 . If .Fl f is specified, calculate the length using .Ic gzip -l . .El .Sh EXIT STATUS -.Nm -exits 0 on success. +.Ex -std .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: .Bd -literal - 0% | | 0 0.00 KB/s --:-- ETA - 40% |********** | 273 KB 271.95 KB/s 00:01 ETA - 81% |************************* | 553 KB 274.61 KB/s 00:00 ETA -100% |*********************************| 680 KB 264.59 KB/s 00:00 ETA + 0% | | 0 0.00 KiB/s --:-- ETA + 40% |******** | 273 KiB 271.95 KiB/s 00:01 ETA + 81% |*********************** | 553 KiB 274.61 KiB/s 00:00 ETA +100% |*******************************| 680 KiB 264.59 KiB/s 00:00 ETA .Ed .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 GiB 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