]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/pump
merge
[plan9front.git] / sys / man / 1 / pump
1 .TH PUMP 1
2 .SH NAME
3 pump \- copy asynchronously via a large circular buffer
4 .SH SYNOPSIS
5 .B pump
6 [
7 .B -b
8 .I iando
9 ] [
10 .B -d
11 .I sleepms
12 ] [
13 .B -f
14 .I ofile
15 ] [
16 .B -i
17 .I ireadsize
18 ] [
19 .B -k
20 .I KB-buf
21 ] [
22 .B -o
23 .I owritesize
24 ] [
25 .B -s
26 .I start-KB
27 ] [
28 .I file
29 \&... ]
30 .SH DESCRIPTION
31 .I Pump
32 copies
33 .IR files
34 (or standard input if none)
35 to standard output
36 by using two processes,
37 one reading and one writing,
38 sharing a large circular buffer,
39 thus permitting the reading process to
40 get ahead of the writing process if the
41 output device is slow (e.g., an optical disc).
42 This in turn can keep the output device busy.
43 The pipeline
44 .L "dd | dd"
45 can approximate this, but pipe buffering is limited to 64K
46 bytes, which is fairly modest.
47 .PP
48 Options are:
49 .TF \fL-m
50 .TP
51 .B -b
52 sets the size of
53 .I read
54 and
55 .I write
56 operations to
57 .I iando
58 bytes.
59 The default size is 8 kilobytes.
60 .TP
61 .B -d
62 causes the output process to sleep for
63 .I sleepms
64 milliseconds initially, giving the reading
65 process time to accumulate data in the buffer.
66 .TP
67 .B -f
68 writes
69 .I ofile
70 rather than standard output
71 .TP
72 .B -i
73 sets the size of
74 .I read
75 operations to
76 .I ireadsize
77 bytes.
78 .TP
79 .B -k
80 allocates a circular buffer of
81 .I KB-buf
82 kilobytes rather than the default
83 5000 kilobytes.
84 .TP
85 .B -o
86 sets the size of
87 .I write
88 operations to
89 .I owritesize
90 bytes.
91 .TP
92 .B -s
93 prevents output until
94 .I start-KB
95 kilobytes have been read.
96 .SH EXAMPLES
97 Append a
98 .IR venti (8)
99 arena to a DVD or BD quickly.
100 .PD 0
101 .IP
102 .EX
103 cdfs
104 venti/rdarena arena0 arena.3 |
105         pump -b 65536 -k 51200 >/mnt/cd/wd/arena.3
106 .EE
107 .PD
108 .\" .SH FILES
109 .SH SOURCE
110 .B /sys/src/cmd/pump.c
111 .SH SEE ALSO
112 .IR cp (1),
113 .IR dd (1),
114 .IR ecp (1),
115 .IR cdfs (4)
116 .SH BUGS
117 .I Pump
118 processes spin while waiting for the circular buffer
119 to fill or drain.