Remove the example with "dialog" and add a more usual use case with tar.

This commit is contained in:
Andrew Wood
2024-12-10 23:08:00 +00:00
parent 1d76c0bc64
commit 0516ba53bd
2 changed files with 12 additions and 15 deletions
+5 -7
View File
@@ -502,15 +502,14 @@ cat file | pv \-\-size 12345 | nc \-w 1 somewhere.com 3000
.EE .EE
.in .in
.PP .PP
A more complicated example using numeric output to feed into the To watch the progress of creating a tar.gz archive:
\fBdialog\fR(1) program for a full-screen progress display:
.PP .PP
.in +4 .in +4
.EX .EX
(tar cf \- . \e tar cf \- directory/ \e
| pv \-\-numeric \-\-size $(du \-sb . | awk '{print $1}') \e | pv \-\-size $(du \-sb directory/ | awk '{print $1}') \e
| gzip \-9 > out.tgz) 2>&1 \e | gzip \-9 \e
| dialog \-\-gauge 'Progress' 7 70 > out.tar.gz
.EE .EE
.in .in
.PP .PP
@@ -689,7 +688,6 @@ Alternatively, use the issue tracker linked from the
.\" .\"
.SH "SEE ALSO" .SH "SEE ALSO"
.BR cat (1), .BR cat (1),
.BR dialog (1),
.BR splice (2), .BR splice (2),
.BR fdatasync (2), .BR fdatasync (2),
.BR open (2) .BR open (2)
+7 -8
View File
@@ -520,13 +520,12 @@ the expected size to **pv**:
cat file | pv --size 12345 | nc -w 1 somewhere.com 3000 cat file | pv --size 12345 | nc -w 1 somewhere.com 3000
A more complicated example using numeric output to feed into the To watch the progress of creating a tar.gz archive:
**dialog**(1) program for a full-screen progress display:
(tar cf - . \ tar cf - directory/ \
| pv --numeric --size $(du -sb . | awk '{print $1}') \ | pv --size $(du -sb directory/ | awk '{print $1}') \
| gzip -9 > out.tgz) 2>&1 \ | gzip -9 \
| dialog --gauge 'Progress' 7 70 > out.tar.gz
Taking an image of a disk, skipping errors: Taking an image of a disk, skipping errors:
@@ -672,8 +671,8 @@ page](https://www.ivarch.com/programs/pv.shtml).
# SEE ALSO # SEE ALSO
**cat**(1), **dialog**(1), **splice**(2), **fdatasync**(2), **open**(2) **cat**(1), **splice**(2), **fdatasync**(2), **open**(2) (for
(for **O_DIRECT**) **O_DIRECT**)
# COPYRIGHT # COPYRIGHT