PUMP(1)PUMP(1)NAMEpump - copy asynchronously via a large circular buffer
SYNOPSISpump [ -b iando ] [ -d sleepms ] [ -f ofile ] [ -i ireadsize ] [ -k KB-
buf ] [ -o owritesize ] [ -s start-KB ] [ file ... ]
DESCRIPTION
Pump copies files (or standard input if none) to standard output by
using two processes, one reading and one writing, sharing a large cir‐
cular buffer, thus permitting the reading process to get ahead of the
writing process if the output device is slow (e.g., an optical disc).
This in turn can keep the output device busy. The pipeline can approx‐
imate this, but pipe buffering is limited to 64K bytes, which is fairly
modest.
Options are:
-b sets the size of read and write operations to iando bytes. The
default size is 8 kilobytes.
-d causes the output process to sleep for sleepms milliseconds ini‐
tially, giving the reading process time to accumulate data in
the buffer.
-f writes ofile rather than standard output
-i sets the size of read operations to ireadsize bytes.
-k allocates a circular buffer of KB-buf kilobytes rather than the
default 5000 kilobytes.
-o sets the size of write operations to owritesize bytes.
-s prevents output until start-KB kilobytes have been read.
EXAMPLES
Append a venti(8) arena to a DVD or BD quickly.
cdfs
venti/rdarena arena0 arena.3 |
pump-b 65536 -k 51200 >/mnt/cd/wd/arena.3
SOURCE
/sys/src/cmd/pump.c
SEE ALSOcp(1), dd(1), ecp(1), cdfs(4)BUGS
Pump processes spin while waiting for the circular buffer to fill or
drain.
PUMP(1)