84c4c1d
.TH CLPBAR 1 "4 November 2003"
84c4c1d
.SH NAME
84c4c1d
clpbar \- show information about a data transfer
84c4c1d
.SH SYNOPSIS
84c4c1d
.RS 0
84c4c1d
.TP 4
84c4c1d
.B clpbar
84c4c1d
[
84c4c1d
.I I/O-options
84c4c1d
]
84c4c1d
[
84c4c1d
.I display-options
84c4c1d
]
84c4c1d
[
84c4c1d
.I color-options
84c4c1d
]
84c4c1d
.br
84c4c1d
[
84c4c1d
.I input-file
84c4c1d
]
84c4c1d
[
84c4c1d
.I output-file
84c4c1d
]
84c4c1d
.br
84c4c1d
[
84c4c1d
.B -h
84c4c1d
|
84c4c1d
.B --help
84c4c1d
]
84c4c1d
[
84c4c1d
.B -v
84c4c1d
|
84c4c1d
.B --version
84c4c1d
]
84c4c1d
.RE
84c4c1d
84c4c1d
.SH DESCRIPTION
84c4c1d
.PP
84c4c1d
clpbar is a simple tool to process a stream of data and print a display for the
84c4c1d
user on stderr showing (a) the amount of data passed, (b) the throughput of
84c4c1d
the data transfer, and, if the total size of the data stream is known, (c)
84c4c1d
estimated time remaining, percent complete, and a progress bar.
84c4c1d
84c4c1d
.PP
84c4c1d
clpbar was originally written for the purpose of estimating the amount of time
84c4c1d
needed to transfer large amounts (many, many gigabytes) of data across a
84c4c1d
network.  (Usually in an SSH/tar pipe.)
84c4c1d
84c4c1d
.SH I/O COMMAND LINE OPTIONS
84c4c1d
84c4c1d
.B -if
84c4c1d
.I input-file
84c4c1d
.br
84c4c1d
.B --in-file
84c4c1d
.I input-file
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Read input from
84c4c1d
.I input-file.
84c4c1d
Default: stdin
84c4c1d
.RE
84c4c1d
84c4c1d
.B -of
84c4c1d
.I output-file
84c4c1d
.br
84c4c1d
.B --out-file
84c4c1d
.I output-file
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Write output to
84c4c1d
.I output-file.  If the output file is a directory, then clpbar will attempt to
84c4c1d
create a file in the output directory with the same name as the input file,
84c4c1d
and attempt to copy the input file mode as well as it's data.
84c4c1d
Default: stdout
84c4c1d
.RE
84c4c1d
.PP
84c4c1d
Please notice that if no 
84c4c1d
.B -if, --in-file, -of,
84c4c1d
or
84c4c1d
.B --out-file
84c4c1d
options are specified on the command line, and an unknown command line option
84c4c1d
is encountered, then clpbar will assume that the first unknown command line
84c4c1d
option is a path to an input file, and the second (if found) is a path to an
84c4c1d
output file.
84c4c1d
84c4c1d
.B -s
84c4c1d
.I size
84c4c1d
.br
84c4c1d
.B --size
84c4c1d
.I size
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Expect an input stream of
84c4c1d
.I size
84c4c1d
bytes.
84c4c1d
.PP
84c4c1d
When reading a regular file or a link to a regular file, clpbar will extract the
84c4c1d
file size on it's own.  However, this flag is useful for reading from a
84c4c1d
character- or block-special device file, or from a pipe.
84c4c1d
.I size
84c4c1d
may be followed by 'k', 'm', 'g', 't', 'p', or 'e' for kilobytes, megabytes,
84c4c1d
gigabytes, terabytes, petabytes, or exabytes, respectively (see also the -k
84c4c1d
option below).  Alternatively, 
84c4c1d
.I size
84c4c1d
may also be specified in terms of 'b' for blocks (see the 
84c4c1d
.B -bl
84c4c1d
option below).
84c4c1d
See examples below.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -c
84c4c1d
.I size
84c4c1d
.br
84c4c1d
.B --completed
84c4c1d
.I size
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Instruct clpbar that
84c4c1d
.I size
84c4c1d
bytes of the data stream have already been copied, and that this is a
84c4c1d
continuation of a previous data stream.  Note that use of this option will
84c4c1d
throw off throughput and ETA calculations at first, but they should settle
84c4c1d
down as the transfer continues.
84c4c1d
84c4c1d
.B -bs
84c4c1d
.I buffer-size
84c4c1d
.br
84c4c1d
.B --buffer-size
84c4c1d
.I buffer-size
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Allocate an I/O buffer of
84c4c1d
.I buffer-size
84c4c1d
bytes.  The same modifiers may apply here ('k', 'm', 'g', 't', 'p', 'e' 
84c4c1d
and 'b') as for the
84c4c1d
.B -s
84c4c1d
flag above.  Changing the buffer size can improve throughput, depending on
84c4c1d
your application of clpbar.  For fast I/O operations, say from a ramdisk for
84c4c1d
instance, it might be worth your while to experiment with a large buffer
84c4c1d
(circa 1MB for instance).  But for slow I/O operations, like from a tape
84c4c1d
drive, you could merely be wasting your memory.  Default: 52488 (512KB)
84c4c1d
.RE
84c4c1d
84c4c1d
.B -th
84c4c1d
.I rate
84c4c1d
.br
84c4c1d
.B --throttle
84c4c1d
.I rate
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Restrict I/O throughput to 
84c4c1d
.I rate
84c4c1d
bytes per second.  The same modifiers apply here ('k', 'm', 'g', 't', 'p', 'e'
84c4c1d
and 'b') as for the 
84c4c1d
.B -s
84c4c1d
flag above.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -i
84c4c1d
.I seconds
84c4c1d
.br
84c4c1d
.B --interval
84c4c1d
.I seconds
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Update the display every
84c4c1d
.I seconds
84c4c1d
seconds.  Default: 1 second
84c4c1d
.RE
84c4c1d
84c4c1d
.B -t
84c4c1d
.I microseconds
84c4c1d
.br
84c4c1d
.B --timeout
84c4c1d
.I microseconds
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
The number of microseconds to wait for a change in I/O state before
84c4c1d
.I select()
84c4c1d
times out.  Default: 250000 (1/4 second)
84c4c1d
.RE
84c4c1d
84c4c1d
.B -k
84c4c1d
1000|1024
84c4c1d
.br
84c4c1d
.B --kilo
84c4c1d
1000|1024
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use either 1000 or 1024 as the definition of a kilobyte.  Default: 1024
84c4c1d
.RE
84c4c1d
84c4c1d
.B -bl
84c4c1d
.I size
84c4c1d
.br
84c4c1d
.B --block-size
84c4c1d
.I size
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
When reading sizes from the command line that are specified in terms of
84c4c1d
blocks, assume a single block is 
84c4c1d
.I size
84c4c1d
bytes.
84c4c1d
.I Size
84c4c1d
may be followed by 'k', 'm', 'g', 't', 'p', or 'e' for kilobytes, megabytes,
84c4c1d
gigabytes, terabytes, petabytes, or exabytes, respectively.  Block size must
84c4c1d
be set before specifying any sizes in terms of blocks or the default value
84c4c1d
will be used instead.  Specifying
84c4c1d
.I size
84c4c1d
in terms of 'b' for blocks is not allowed for this option.  Default: 512
84c4c1d
.RE
84c4c1d
84c4c1d
.SH DISPLAY COMMAND LINE OPTIONS
84c4c1d
84c4c1d
.B -sw
84c4c1d
.I width
84c4c1d
.br
84c4c1d
.B --screen-width
84c4c1d
.I width
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Assume a screen width of 
84c4c1d
.I width
84c4c1d
characters.
84c4c1d
84c4c1d
clpbar will attempt to retrieve the width of the terminal it is running on, and
84c4c1d
will adjust that width if the terminal is resized.  If clpbar cannot determine
84c4c1d
the terminal width, then clpbar will assume a default width of 79 characters.
84c4c1d
Use the
84c4c1d
.B --screen-width
84c4c1d
command line option to override this behavior and specify a fixed width for
84c4c1d
clpbar to use.  (When this option is used, clpbar will ignore terminal resized
84c4c1d
signals and continue to use the value provided by the user.)
84c4c1d
.RE
84c4c1d
84c4c1d
.B -sw-1
84c4c1d
|
84c4c1d
.B --screen-width-minus-one
84c4c1d
.br
84c4c1d
.B -sw-0
84c4c1d
|
84c4c1d
.B --screen-width-minus-zero
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Instruct clpbar to use either the entire column width reported by termio, or one
84c4c1d
less than reported by termio.  I.e. If termio reports that you are running clpbar
84c4c1d
in a terminal that's 80 characters wide, using the command line option
84c4c1d
.B --screen-width-minus-one
84c4c1d
instructs clpbar to only use 79 characters to print the display.  If you're using
84c4c1d
a terminal or shell that wraps the line whenever clpbar prints the last character
84c4c1d
then this should alleviate that problem.  Default is to use the full
84c4c1d
terminal's width.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -ti
84c4c1d
.I string
84c4c1d
|
84c4c1d
.B --title
84c4c1d
.I string
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
Set the title to 
84c4c1d
.IR string .
84c4c1d
.RE
84c4c1d
84c4c1d
.B -dti
84c4c1d
|
84c4c1d
.B -nti
84c4c1d
.br
84c4c1d
.B --display-title
84c4c1d
|
84c4c1d
.B --no-title
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
Turn on/off the title display.  Even if on, if no title string is set then no
84c4c1d
title will be displayed.  Default is on.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -dtw
84c4c1d
|
84c4c1d
.B --display-twiddle
84c4c1d
.br
84c4c1d
.B -ntw
84c4c1d
|
84c4c1d
.B --no-twiddle
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the twiddle in the display.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -dc
84c4c1d
|
84c4c1d
.B --display-count
84c4c1d
.br
84c4c1d
.B -nc
84c4c1d
|
84c4c1d
.B --no-count
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the data count in the display.  Default is on.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -dcb
84c4c1d
|
84c4c1d
.B -ncb
84c4c1d
.br
84c4c1d
.B --display-count-bits
84c4c1d
|
84c4c1d
.B --no-count-bits
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
Display the data count at bits instead of as bytes.  Default is off.
84c4c1d
.PP
84c4c1d
By default clpbar will display the data count as bytes using the notation of "B".
84c4c1d
Using this option, clpbar will display the throughput as bits using the notation
84c4c1d
of "b".
84c4c1d
.RE
84c4c1d
84c4c1d
.B -dth
84c4c1d
|
84c4c1d
.B --display-throughput
84c4c1d
.br
84c4c1d
.B -nth
84c4c1d
|
84c4c1d
.B --no-throughput
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the data throughput in the display.  Default is on.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -dthb
84c4c1d
|
84c4c1d
.B -nthb
84c4c1d
.br
84c4c1d
.B --display-throughput-bits
84c4c1d
|
84c4c1d
.B --no-throughput-bits
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
Display throughput as bits/second instead of as bytes/second.  Default is off.
84c4c1d
.PP
84c4c1d
By default clpbar will display the throughput as bytes/second using the notation
84c4c1d
of "B/s".  Using this option, clpbar will display the throughput as bits/second
84c4c1d
using the notation of "b/s".
84c4c1d
.RE
84c4c1d
84c4c1d
.B -dt
84c4c1d
|
84c4c1d
.B --display-time
84c4c1d
.br
84c4c1d
.B -nt
84c4c1d
|
84c4c1d
.B --no-time
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the time elapsed or eta in the display.  Default is on.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -de
84c4c1d
|
84c4c1d
.B --display-elapsed-only
84c4c1d
.br
84c4c1d
.B -ne
84c4c1d
|
84c4c1d
.B --no-elapsed-only
84c4c1d
.RS 2
84c4c1d
.PP 
84c4c1d
Force clpbar to display the elapsed time instead of the eta.  Default is off.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -dp
84c4c1d
|
84c4c1d
.B --display-percent
84c4c1d
.br
84c4c1d
.B -np
84c4c1d
|
84c4c1d
.B --no-percent
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off percent complete in the display.  Default is on.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -db
84c4c1d
|
84c4c1d
.B --display-bar
84c4c1d
.br
84c4c1d
.B -nb
84c4c1d
|
84c4c1d
.B --no-bar
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the progress bar in the display.  Default is on.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -ds
84c4c1d
|
84c4c1d
.B --display-summary
84c4c1d
.br
84c4c1d
.B -ns
84c4c1d
|
84c4c1d
.B --no-summary
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the summary information displayed when the operation is complete.
84c4c1d
Default is on.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -da
84c4c1d
|
84c4c1d
.B --display-all
84c4c1d
.br
84c4c1d
.B -dn
84c4c1d
|
84c4c1d
.B --display-none
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off all displays.  -dn is equivalent to -ntw -nc -nth -nt -np -nb.
84c4c1d
(Using -dn followed by -db would be equivalent to -ntw -nc -nth -nt -np.)
84c4c1d
-da is equivalent to -dtw -dc -dth -dt -dp -db.
84c4c1d
.RE
84c4c1d
84c4c1d
.SH COLOR COMMAND LINE OPTIONS
84c4c1d
84c4c1d
.PP
84c4c1d
For the following color-specific command line options, the following keywords
84c4c1d
are recognized as valid color names: normal, black, red, green, yellow, blue,
84c4c1d
magenta, cyan, and white
84c4c1d
84c4c1d
.B -dan
84c4c1d
|
84c4c1d
.B --display-ansi
84c4c1d
.br
84c4c1d
.B -nan
84c4c1d
|
84c4c1d
.B --no-ansi
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the use of ansi color codes in the display.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -spbg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --space-background
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use
84c4c1d
.I color
84c4c1d
as the background color for spacing between display objects.  Default: normal
84c4c1d
.RE
84c4c1d
84c4c1d
.B -twfg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --twiddle-foreground
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.B -twbg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --twiddle-background
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use
84c4c1d
.I color
84c4c1d
as the twiddle color in the display.  Default: normal
84c4c1d
.RE
84c4c1d
84c4c1d
.B -twb
84c4c1d
|
84c4c1d
.B --twiddle-bold
84c4c1d
.br
84c4c1d
.B -twn
84c4c1d
|
84c4c1d
.B --twiddle-normal
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the use of bold font when displaying the twiddle.  Default off
84c4c1d
.RE
84c4c1d
84c4c1d
.B -tifg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --title-foreground
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.B -tibg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --title-background
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use
84c4c1d
.I color
84c4c1d
as the title color in the display.  Default: normal
84c4c1d
.RE
84c4c1d
84c4c1d
.B -tib
84c4c1d
|
84c4c1d
.B --title-bold
84c4c1d
.br
84c4c1d
.B -tin
84c4c1d
|
84c4c1d
.B --title-normal
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the use of bold font when displaying the title.  Default off
84c4c1d
.RE
84c4c1d
84c4c1d
.B -cfg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --count-foreground
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.B -cbg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --count-background
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use
84c4c1d
.I color
84c4c1d
as the data count color in the display.  Default: normal
84c4c1d
.RE
84c4c1d
84c4c1d
.B -cb
84c4c1d
|
84c4c1d
.B --count-bold
84c4c1d
.br
84c4c1d
.B -cn
84c4c1d
|
84c4c1d
.B --count-normal
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the use of bold font when displaying the data count.  Default off
84c4c1d
.RE
84c4c1d
84c4c1d
.B -thlfg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --throughput-label-foreground
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.B -thlbg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --throughput-label-background
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use
84c4c1d
.I color
84c4c1d
as the throughput label color in the display.  Default: normal
84c4c1d
.RE
84c4c1d
84c4c1d
.B -thlb
84c4c1d
|
84c4c1d
.B --throughput-label-bold
84c4c1d
.br
84c4c1d
.B -thln
84c4c1d
|
84c4c1d
.B --throughput-label-normal
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the use of bold font when displaying the throughput label.
84c4c1d
Default off
84c4c1d
.RE
84c4c1d
84c4c1d
.B -thfg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --throughput-foreground
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.B -thbg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --throughput-background
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use
84c4c1d
.I color
84c4c1d
as the throughput color in the display.  Default: normal
84c4c1d
.RE
84c4c1d
84c4c1d
.B -thb
84c4c1d
|
84c4c1d
.B --throughput-bold
84c4c1d
.br
84c4c1d
.B -thn
84c4c1d
|
84c4c1d
.B --throughput-normal
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the use of bold font when displaying the throughput.
84c4c1d
Default off
84c4c1d
.RE
84c4c1d
84c4c1d
.B -tlfg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --time-label-foreground
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.B -tlbg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --time-label-background
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use
84c4c1d
.I color
84c4c1d
as the time label color in the display.  Default: normal
84c4c1d
.RE
84c4c1d
84c4c1d
.B -tlb
84c4c1d
|
84c4c1d
.B --time-label-bold
84c4c1d
.br
84c4c1d
.B -tln
84c4c1d
|
84c4c1d
.B --time-label-normal
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the use of bold font when displaying the time label.
84c4c1d
Default off
84c4c1d
.RE
84c4c1d
84c4c1d
.B -tfg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --time-foreground
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.B -tbg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --time-background
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use
84c4c1d
.I color
84c4c1d
as the time color in the display.  Default: normal
84c4c1d
.RE
84c4c1d
84c4c1d
.B -tb
84c4c1d
|
84c4c1d
.B --time-bold
84c4c1d
.br
84c4c1d
.B -tn
84c4c1d
|
84c4c1d
.B --time-normal
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the use of bold font when displaying the time.
84c4c1d
Default off
84c4c1d
.RE
84c4c1d
84c4c1d
.B -pfg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --percent-foreground
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.B -pbg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --percent-background
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use
84c4c1d
.I color
84c4c1d
as the percent color in the display.  Default: normal
84c4c1d
.RE
84c4c1d
84c4c1d
.B -pb
84c4c1d
|
84c4c1d
.B --percent-bold
84c4c1d
.br
84c4c1d
.B -pn
84c4c1d
|
84c4c1d
.B --percent-normal
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the use of bold font when displaying the percent.
84c4c1d
Default off
84c4c1d
.RE
84c4c1d
84c4c1d
.B -bbfg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --bar-brace-foreground
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.B -bbbg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --bar-brace-background
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use
84c4c1d
.I color
84c4c1d
as the brace color around the progress bar in the display.  Default: normal
84c4c1d
.RE
84c4c1d
84c4c1d
.B -bbb
84c4c1d
|
84c4c1d
.B --bar-brace-bold
84c4c1d
.br
84c4c1d
.B -bbn
84c4c1d
|
84c4c1d
.B --bar-brace-normal
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the use of bold font when displaying the bar braces.
84c4c1d
Default off
84c4c1d
.RE
84c4c1d
84c4c1d
.B -bfg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --bar-foreground
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.B -bbg
84c4c1d
.I color
84c4c1d
|
84c4c1d
.B --bar-background
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use
84c4c1d
.I color
84c4c1d
as the color of the progress bar in the display.  Default: normal
84c4c1d
.RE
84c4c1d
84c4c1d
.B -bb
84c4c1d
|
84c4c1d
.B --bar-bold
84c4c1d
.br
84c4c1d
.B -bn
84c4c1d
|
84c4c1d
.B --bar-normal
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Turn on/off the use of bold font when displaying the progress bar.
84c4c1d
Default off
84c4c1d
.RE
84c4c1d
84c4c1d
.B -h
84c4c1d
|
84c4c1d
.B --help
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Display this text and exit.
84c4c1d
.RE
84c4c1d
84c4c1d
.B -v
84c4c1d
|
84c4c1d
.B --version
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Display the program version and exit.
84c4c1d
.RE
84c4c1d
84c4c1d
.SH RESOURCE FILE OPTIONS
84c4c1d
84c4c1d
.PP
84c4c1d
Some command line options may be specified in a resource file.  clpbar will
84c4c1d
search for a resource file by the name of
84c4c1d
.B ~/.clpbarrc
84c4c1d
and, if found, clpbar will use the values within by default.  In addition, clpbar
84c4c1d
will also search for a file in the directory in which it is run,
84c4c1d
.BR ./.clpbarrc .
84c4c1d
If this file exists, it's values will override the values found in
84c4c1d
.BR ~/.clpbarrc .
84c4c1d
Values in both files may be overridden by command line flags.  Lines that
84c4c1d
begin with a # are ignored.
84c4c1d
84c4c1d
.PP
84c4c1d
For resource options requiring a
84c4c1d
.I boolean
84c4c1d
value, the following values are recognized: on and off, yes and no, (and the
84c4c1d
single-character abbreviations y and n), true and false, (and the
84c4c1d
single-character abbreviations t and f), 0 and 1.
84c4c1d
84c4c1d
.PP
84c4c1d
For resource options requiring a
84c4c1d
.I color
84c4c1d
value, the same keywords are recognized as for the color-specific command line
84c4c1d
options above: normal, black, red, green, yellow, blue, magenta, cyan, and
84c4c1d
white
84c4c1d
84c4c1d
.BR buffer-size :
84c4c1d
.I buffer-size
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Allocate an I/O buffer of
84c4c1d
.I buffer-size
84c4c1d
bytes.  See the
84c4c1d
.B --buffer-size
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR throttle :
84c4c1d
.I rate
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Restrict I/O throughput to 
84c4c1d
.I rate
84c4c1d
bytes per second.  See the
84c4c1d
.B --throttle
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR interval :
84c4c1d
.I seconds
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Update the display every
84c4c1d
.I seconds
84c4c1d
seconds.  See the
84c4c1d
.B --interval
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR timeout :
84c4c1d
.I microseconds
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
The number of microseconds to wait for a change in I/O state before
84c4c1d
.I select()
84c4c1d
times out.  See the 
84c4c1d
.B --timeout
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR kilobyte :
84c4c1d
1000|1024
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use either 1000 or 1024 as the definition of a kilobyte.  See the
84c4c1d
.B --kilo
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR block-size :
84c4c1d
.I size
84c4c1d
.RS 2
84c4c1d
When parsing sizes specified in terms of blocks, assume a single block is 
84c4c1d
.I size
84c4c1d
bytes.  See the
84c4c1d
.B --block-size
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR screen-width :
84c4c1d
.I width
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Override termio and assume that the screen is 
84c4c1d
.I width
84c4c1d
characters wide.  See the 
84c4c1d
.B --screen-width
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR screen-width-minus-one :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Instruct clpbar to restrict the number of columns reported by termio by one.  See
84c4c1d
the
84c4c1d
.B --screen-width-minus-one
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR display-twiddle :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Instruct clpbar to turn on/off the twirling twiddle character in the display.
84c4c1d
See the 
84c4c1d
.B --display-twiddle
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR display-title :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Instruct clpbar to turn on/off the title in the display.  See the
84c4c1d
.B --display-title 
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR display-count :
84c4c1d
boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Instruct clpbar to turn on/off the data count in the display.  See the
84c4c1d
.B --display-count
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR display-count-bits :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Display the data count as bits instead of as bytes.  See the
84c4c1d
.B --display-count-bits
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR display-throughput :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Instruct clpbar to turn on/off the data throughput in the display.  See the
84c4c1d
.B --display-throughput
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR display-throughput-bits :
84c4c1d
boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Display throughput as bits/sec instead of as bytes/sec.  See the
84c4c1d
.B --display-throughput-bits
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR display-time :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Instruct clpbar to turn on/off the time in the display.  See the
84c4c1d
.B --display-time
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR display-elapsed-only :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Force clpbar to display the elapsed time instead of the eta.  See the
84c4c1d
.B --display-elapsed-only
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR display-percent :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Instruct clpbar to turn on/off the percent complete in the display.  See the
84c4c1d
.B --display-percent
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR display-bar :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Instruct clpbar to turn on/off the progress bar in the display.  See the
84c4c1d
.B --display-bar
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR display-summary :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Instruct clpbar to turn on/off the summary information displayed when operation
84c4c1d
is complete.  See the 
84c4c1d
.B --display-summary
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR display-ansi :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Instruct clpbar to turn on/off the use of ansi color codes in the display.  See
84c4c1d
the
84c4c1d
.B --display-ansi
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR space-background :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use
84c4c1d
.I color
84c4c1d
as the background color for spacing between display objects.  See the
84c4c1d
.B --space-background
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR twiddle-foreground :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR twiddle-background :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR twiddle-bold :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use the specified colors for the foreground and background of the twiddle,
84c4c1d
and use a bold font.  See the
84c4c1d
.BR --twiddle-foreground ,
84c4c1d
.BR --twiddle-background ,
84c4c1d
and
84c4c1d
.B --twiddle-bold
84c4c1d
command line options above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR title :
84c4c1d
.I string
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Set the title string for the display.  See the
84c4c1d
.B --title
84c4c1d
command line option above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR title-foreground :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR title-background :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR title-bold :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use the specified colors for the foreground and background of the title,
84c4c1d
and use a bold font.  See the
84c4c1d
.BR --title-foreground ,
84c4c1d
.BR --title-background ,
84c4c1d
and
84c4c1d
.B --title-bold
84c4c1d
command line options above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR count-foreground :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR count-background :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR count-bold :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use the specified colors for the foreground and background of the data count,
84c4c1d
and use a bold font.  See the
84c4c1d
.BR --count-foreground ,
84c4c1d
.BR --count-background ,
84c4c1d
and
84c4c1d
.B --count-bold
84c4c1d
command line options above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR throughput-label-foreground :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR throughput-label-background :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR throughput-label-bold :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use the specified colors for the foreground and background of the throughput
84c4c1d
label, and use a bold font.  See the
84c4c1d
.BR --throughput-label-foreground ,
84c4c1d
.BR --throughput-label-background ,
84c4c1d
and
84c4c1d
.B --throughput-label-bold
84c4c1d
command line options above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR throughput-foreground :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR throughput-background :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR throughput-bold :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use the specified colors for the foreground and background of the throughput,
84c4c1d
and use a bold font.  See the
84c4c1d
.BR --throughput-foreground ,
84c4c1d
.BR --throughput-background ,
84c4c1d
and
84c4c1d
.B --throughput-bold
84c4c1d
command line options above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR time-label-foreground :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR time-label-background :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR time-label-bold :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use the specified colors for the foreground and background of the time
84c4c1d
label, and use a bold font.  See the
84c4c1d
.BR --time-label-foreground ,
84c4c1d
.BR --time-label-background ,
84c4c1d
and
84c4c1d
.B --time-label-bold
84c4c1d
command line options above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR time-foreground :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR time-background :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR time-bold :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use the specified colors for the foreground and background of the time,
84c4c1d
and use a bold font.  See the
84c4c1d
.BR --time-foreground ,
84c4c1d
.BR --time-background ,
84c4c1d
and
84c4c1d
.B --time-bold
84c4c1d
command line options above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR percent-foreground :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR percent-background :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR percent-bold :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use the specified colors for the foreground and background of the percent,
84c4c1d
and use a bold font.  See the
84c4c1d
.BR --percent-foreground ,
84c4c1d
.BR --percent-background ,
84c4c1d
and
84c4c1d
.B --percent-bold
84c4c1d
command line options above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR bar-brace-foreground :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR bar-brace-background :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR bar-brace-bold :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Use the specified colors for the foreground and background of the brace
84c4c1d
surrounding the progress bar, and use a bold font.  See the
84c4c1d
.BR --bar-brace-foreground ,
84c4c1d
.BR --bar-brace-background ,
84c4c1d
and
84c4c1d
.B --bar-brace-bold
84c4c1d
command line options above.
84c4c1d
.RE
84c4c1d
84c4c1d
.BR bar-foreground :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR bar-background :
84c4c1d
.I color
84c4c1d
.br
84c4c1d
.BR bar-bold :
84c4c1d
.I boolean
84c4c1d
.br
84c4c1d
.RS 2
84c4c1d
Use the specified colors for the foreground and background of the progress
84c4c1d
bar, and use a bold font.  See the
84c4c1d
.BR --bar-foreground ,
84c4c1d
.BR --bar-background ,
84c4c1d
and
84c4c1d
.B --bar-bold
84c4c1d
command line options above.
84c4c1d
.RE
84c4c1d
84c4c1d
.SH EXAMPLES
84c4c1d
84c4c1d
.PP
84c4c1d
Example 1: Using clpbar to copy a 2.4gb file from a device (in this case a tape
84c4c1d
drive) to a file, using a 64k buffer.
84c4c1d
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
prompt% clpbar --in-file /dev/rmt/1cbn --out-file \\
84c4c1d
.br
84c4c1d
tape-restore.tar --size 2.4g --buffer-size 64k
84c4c1d
.RE
84c4c1d
  
84c4c1d
.PP
84c4c1d
Example 2: Using clpbar to copy a 37tb file across the network using SSH.
84c4c1d
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
prompt% ssh remote 'dd if=file' | clpbar --size 37t > file
84c4c1d
.RE
84c4c1d
84c4c1d
.PP
84c4c1d
Example 3: Using clpbar inside a tar-pipe command:
84c4c1d
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
Normal tar-pipe command might be:
84c4c1d
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
prompt% (cd /some/dir/somewhere && tar -cf - *) \\
84c4c1d
.br
84c4c1d
| (cd /some/other/dir && tar -xBpf -)
84c4c1d
.RE
84c4c1d
84c4c1d
.PP
84c4c1d
3a: Using clpbar within the tar-pipe:
84c4c1d
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
prompt% (cd /some/dir/somewhere && tar -cf - *) \\
84c4c1d
.br
84c4c1d
| clpbar \\
84c4c1d
.br
84c4c1d
| (cd /some/other/dir && tar -xBpf -)
84c4c1d
.RE
84c4c1d
84c4c1d
.PP
84c4c1d
3b: Using clpbar with the --size option in a tar-pipe:
84c4c1d
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
prompt% du -sk /some/dir/somewhere
84c4c1d
.br
84c4c1d
6281954 /some/dir/somewhere
84c4c1d
.br
84c4c1d
.PP
84c4c1d
prompt% (cd /some/dir/somewhere && tar -cf - *) \\
84c4c1d
.br
84c4c1d
| clpbar --size 6281954k \\
84c4c1d
.br
84c4c1d
| (cd /some/other/dir && tar -xBpf -)
84c4c1d
.RE
84c4c1d
.RE
84c4c1d
84c4c1d
.PP
84c4c1d
Example 4: Using clpbar on a regular file.  (Note that the
84c4c1d
.B --size
84c4c1d
option is not needed here, as clpbar will retrieve the file size itself.)
84c4c1d
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
prompt% clpbar --in-file ./file | ssh remote 'cd /some/dir && dd of=file'
84c4c1d
.RE
84c4c1d
  
84c4c1d
.PP
84c4c1d
Example 5: Generating a 512k file of random data.
84c4c1d
84c4c1d
.RS 2
84c4c1d
.PP
84c4c1d
prompt% dd if=/dev/random bs=1024 count=512 \\
84c4c1d
.br
84c4c1d
| clpbar -s 512k -of ./random
84c4c1d
.RE
84c4c1d
84c4c1d
.PP
84c4c1d
Example 6: An example .clpbarrc file.
84c4c1d
.RS 2
84c4c1d
#
84c4c1d
.br
84c4c1d
# This is an example of what a ~/.clpbarrc file 
84c4c1d
.br
84c4c1d
# might look like.  Note that lines beginning
84c4c1d
.br
84c4c1d
# with a # are ignored.
84c4c1d
.br
84c4c1d
#
84c4c1d
.br
84c4c1d
display-twiddle: no
84c4c1d
.br
84c4c1d
display-ansi: yes
84c4c1d
.br
84c4c1d
# space-background: black
84c4c1d
.br
84c4c1d
twiddle-foreground: green
84c4c1d
.br
84c4c1d
# twiddle-background: normal
84c4c1d
.br
84c4c1d
# twiddle-bold: no
84c4c1d
.br
84c4c1d
count-foreground: green
84c4c1d
.br
84c4c1d
# count-background: magenta
84c4c1d
.br
84c4c1d
count-bold: yes
84c4c1d
.br
84c4c1d
throughput-label-foreground: normal
84c4c1d
.br
84c4c1d
# throughput-label-background: red
84c4c1d
.br
84c4c1d
throughput-label-bold: no
84c4c1d
.br
84c4c1d
throughput-foreground: green
84c4c1d
.br
84c4c1d
# throughput-background: black
84c4c1d
.br
84c4c1d
throughput-bold: yes
84c4c1d
.br
84c4c1d
time-label-foreground: normal
84c4c1d
.br
84c4c1d
# time-label-background: red
84c4c1d
.br
84c4c1d
time-label-bold: no
84c4c1d
.br
84c4c1d
time-foreground: green
84c4c1d
.br
84c4c1d
# time-background: black
84c4c1d
.br
84c4c1d
time-bold: yes
84c4c1d
.br
84c4c1d
percent-foreground: green
84c4c1d
.br
84c4c1d
# percent-background: green
84c4c1d
.br
84c4c1d
percent-bold: yes
84c4c1d
.br
84c4c1d
bar-brace-foreground: red
84c4c1d
.br
84c4c1d
# bar-brace-background: blue
84c4c1d
.br
84c4c1d
bar-brace-bold: no
84c4c1d
.br
84c4c1d
bar-foreground: yellow
84c4c1d
.br
84c4c1d
# bar-background: blue
84c4c1d
.br
84c4c1d
bar-bold: yes
84c4c1d
.RE
84c4c1d
84c4c1d
.SH NOTES
84c4c1d
84c4c1d
.RS 0
84c4c1d
.TP 2
84c4c1d
-
84c4c1d
The
84c4c1d
.B --size
84c4c1d
option is only used by clpbar in calculating information about the data
84c4c1d
transfer.  clpbar will not cease copying data once it has reached the number of
84c4c1d
bytes specified with the 
84c4c1d
.B --size
84c4c1d
option, but instead clpbar will continue to copy
84c4c1d
data until and end of input is reached.  If this behavior is undesirable then
84c4c1d
clpbar may be used in conjunction with dd, where the count option is used with dd
84c4c1d
to specify when to cut off the input stream.  (See examples above.)
84c4c1d
.RE
84c4c1d
84c4c1d
.RS 0
84c4c1d
.TP 2
84c4c1d
-
84c4c1d
When using other commands such as 
84c4c1d
.B du -k
84c4c1d
to calculate the expected size of a
84c4c1d
data transfer stream, the value returned may not be exactly the number of
84c4c1d
bytes counted by clpbar in the actual data transfer.  Common causes for this
84c4c1d
discrepancy could be attributed to round-off error or the use of 1000 bytes as
84c4c1d
a kilobyte rather than 1024.  (If the later is the case, then using the 
84c4c1d
.B -k
84c4c1d
1000 option to clpbar will help.)  When such discrepancies occur, clpbar may report
84c4c1d
that the data stream contained only 98% or as much as 101% of it's expected
84c4c1d
size.  (If you have doubts, you should definitely verify your data using
84c4c1d
md5sum, diff, or cmp.)
84c4c1d
.RE
84c4c1d
84c4c1d
.RS 0
84c4c1d
.TP 2
84c4c1d
-
84c4c1d
When the value of a calculation exceeds the size alloted for the display, the
84c4c1d
value +99... will be substituted in it's place.  The complete value will be
84c4c1d
displayed in a summary statement after clpbar has reached the end of input.
84c4c1d
.RE
84c4c1d
84c4c1d
.RS 0
84c4c1d
.TP 2
84c4c1d
-
84c4c1d
clpbar assumes a linear relationship between the speed of the data transfer and
84c4c1d
the amount of time remaining.  Specifically the calculation is based on the
84c4c1d
following:
84c4c1d
84c4c1d
elapsed time / eta = bytes written / total size
84c4c1d
84c4c1d
However, it has been the author's experience that the throughput speed will
84c4c1d
change, particularly at the beginning of the transfer, and this will affect the
84c4c1d
estimated time remaining.  The author does not believe this is a bug, but a
84c4c1d
side-effect of this method of calculation.
84c4c1d
.RE
84c4c1d
84c4c1d
.RS 0
84c4c1d
.TP 2
84c4c1d
-
84c4c1d
clpbar assumes that there are 8 bits in both a byte and a char.
84c4c1d
.RE
84c4c1d
84c4c1d
.SH BUGS
84c4c1d
84c4c1d
.TP 2
84c4c1d
-
84c4c1d
clpbar uses the
84c4c1d
.I open()
84c4c1d
and
84c4c1d
.I fstat()
84c4c1d
functions to open and retrieve the size of regular files when using either the
84c4c1d
.B --in-file
84c4c1d
or
84c4c1d
.B --out-file
84c4c1d
command line options.  Some OS's do not support Large Files (file sizes up to
84c4c1d
(2**63)-1 bytes) natively.  Some OS's support Large Files but require
84c4c1d
_FILE_OFFSET_BITS or _LARGE_FILES to be defined properly at compile time.
84c4c1d
Other OS's support neither, but still allow programs to open files in excess
84c4c1d
of (2**32)-1 through an O_LARGEFILE option that can be passed to the
84c4c1d
.I open()
84c4c1d
function.
84c4c1d
84c4c1d
When trying to open files greater than 2gb on an OS without Large File
84c4c1d
support, clpbar will exit with the message: "File too large".  When trying to
84c4c1d
write more than 2gb of data to a file, clpbar will write 2**32-1 bytes and then
84c4c1d
the OS may terminate clpbar with a message similar to: "File size limit
84c4c1d
exceeded".
84c4c1d
84c4c1d
When trying to open files greater than 2gb on an OS without Large File
84c4c1d
support, but with the O_LARGEFILE option that can be passed to 
84c4c1d
.IR open() ,
84c4c1d
clpbar will receive an error when trying to retrieve the file's size, but clpbar
84c4c1d
will be able to open the file anyway.  Under these circumstances, clpbar will
84c4c1d
print a "File too large" error message, but will then proceed to transfer the
84c4c1d
data.  Since clpbar will not be able to retrieve the file's size on it's own, the
84c4c1d
.B --size
84c4c1d
command line option must be used after the
84c4c1d
.B --in-file
84c4c1d
option to tell clpbar the file size manually.  On such OS's, clpbar should be able
84c4c1d
to write more than 2gb of data to a file without any problems.
84c4c1d
84c4c1d
For OS's that support files greater than 2gb, either natively or through the
84c4c1d
Large File extension definitions mentioned above, clpbar should work as expected.
84c4c1d
84c4c1d
.TP 2
84c4c1d
-
84c4c1d
The author has noticed that when running clpbar over an SSH connection, sometimes
84c4c1d
window resize events are not captured until after the display has gone through
84c4c1d
one or two more updates, which can cause the line to wrap.
84c4c1d
84c4c1d
.TP 2
84c4c1d
-
84c4c1d
The author has noticed that on some systems the use of aligned memory
84c4c1d
allocation, through either memalign() or posix_memalign(), causes clpbar to
84c4c1d
commit a segmentation fault the first time read() or readv() is called and
84c4c1d
passed a pointer to the aligned memory as it's input buffer.  Attempts were
84c4c1d
made to try to isolate systems in which this bug bites through tests in
84c4c1d
configure, but all tests devised passed with flying colors.  Therefore aligned
84c4c1d
memory allocation is turned off by default, and may only be enabled by passing
84c4c1d
--enable-use-memalign to configure when building the executable.
84c4c1d
84c4c1d
.PP
84c4c1d
Report all bugs to the author.
84c4c1d
84c4c1d
.PP
84c4c1d
clpbar was developed on a Sun workstation running Solaris 8.  To the best of the
84c4c1d
author's knowledge clpbar should compile and run on other platforms without much
84c4c1d
trouble.  Should other OS's require modifications to the code, the author
84c4c1d
welcomes all patch submissions, but requests that you include the file
84c4c1d
.I config.log
84c4c1d
and the output of 
84c4c1d
.I "gcc -dumpspecs"
84c4c1d
(or a listing of predefined variables, if not using gcc).
84c4c1d
84c4c1d
.SH DISTRIBUTION
84c4c1d
.PP
84c4c1d
The latest version of clpbar can always be found at:
84c4c1d
.RS 2
84c4c1d
http://www.freshmeat.net/projects/commandlineprogressbar
84c4c1d
.br
84c4c1d
http://sourceforge.net/projects/clpbar/
84c4c1d
.RE
84c4c1d
84c4c1d
.SH AUTHOR
84c4c1d
.PP
84c4c1d
clpbar was written by Michael Peek.  See DISTRIBUTION above for contact
84c4c1d
information.
84c4c1d
.PP
84c4c1d
Occasionally, the author fancies that he knows what he's doing.  It is at
84c4c1d
these times more than ever that his coworkers should cower in fear...
84c4c1d