pump – copy asynchronously via a large circular buffer


pump [ -b iando ] [ -d sleepms ] [ -f ofile ] [ -i ireadsize ] [ -k KB-buf ] [ -o owritesize ] [ -s start-KB ] [ file ... ]


Pump copies files (or standard input if none) to standard output by using two processes, one reading and one writing, sharing a large circular 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 dd | dd can approximate this, but pipe buffering is limited to 64K bytes, which is fairly modest.

Options are:


sets the size of read and write operations to iando bytes. The default size is 8 kilobytes.  


causes the output process to sleep for sleepms milliseconds initially, giving the reading process time to accumulate data in the buffer.  


writes ofile rather than standard output  


sets the size of read operations to ireadsize bytes.  


allocates a circular buffer of KB-buf kilobytes rather than the default 5000 kilobytes.  


sets the size of write operations to owritesize bytes.  


prevents output until start-KB kilobytes have been read.  


Append a venti(8) arena to a DVD or BD quickly.


venti/rdarena arena0 arena.3 |
	pump -b 65536 -k 51200 >/mnt/cd/wd/arena.3




cp(1), dd(1), ecp(1), cdfs(4)


Pump processes spin while waiting for the circular buffer to fill or drain.