source: trunk/minix/man/man1/vol.1@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 3.5 KB
RevLine 
[9]1.TH VOL 1
2.SH NAME
3vol \- split input on or combine output from several volumes
4.SH SYNOPSIS
5.B vol
6.RB [ \-rw1 ]
7.RB [ \-b
8.IR blocksize ]
9.RB [ \-m
10.IR multiple ]
11.RI [ size ]
12.I device
13.SH DESCRIPTION
14.B Vol
15either reads a large input stream from standard input and distributes it
16over several volumes or combines volumes and sends them to
17standard output. The size of the volumes is determined automatically if
18the device supports this, but may be specified before the
19argument naming the device if automated detection is not possible or if
20only part of the physical volume is used. The direction of the data is
21automatically determined by checking whether the input or output of
22.B vol
23is a file or pipe. Use the
24.B \-r
25or
26.B \-w
27flag if you want to specify the direction explicitly, in shell scripts
28for instance.
29.PP
30.B Vol
31waits for each new volume to be inserted, typing return makes it continue.
32If no size is explicitely given then the size of the device is determined
33each time before it is read or written, so it is possible to mix floppies
34of different sizes. If the size cannot be determined (probably a tape) then
35the device is assumed to be infinitely big.
36.B Vol
37can be used both for block or character devices. It will buffer the data
38and use a block size appropriate for fixed or variable block sized tapes.
39.PP
40.B Vol
41reads or writes 8192 bytes to block devices, usually floppies. Character
42devices are read or written using a multiple of 512 bytes. This multiple
43has an upper limit of 32767 bytes (16-bit machine), 64 kb (32-bit), or even
441 Mb (32-bit VM). The last partial write to a character device is padded
45with zeros to the block size. If a character device is a tape device that
46responds to the
47.BR mtio (4)
48status call then the reported tape block size will be used as the smallest
49unit. If the tape is a variable block length device then it is read or
50written like a block device, 8192 bytes at the time, with a minimum unit
51of one byte.
52.PP
53All sizes may be suffixed by the letters
54.BR M ,
55.BR k ,
56.BR b
57or
58.BR w
59to multiply the number by mega, kilo, block (512), or word (2). The volume
60size by default in kilobytes if there is no suffix.
61.SH OPTIONS
62.TP
63.B \-rw
64Explicitly specify reading or writing. Almost mandatory in scripts.
65.TP
66.B \-1
67Just one volume, start immediately.
68.TP
69.BI \-b " blocksize"
70Specify the device block size.
71.TP
72.BI \-m " multiple"
73Specify the maximum read or write size of multiple blocks. The
74.B \-b
75and
76.B \-m
77options allow one to modify the block size assumptions that are made above.
78These assumptions are
79.B "\-b 1 \-m 8192"
80for block devices or variable length tapes, and
81.B "\-b 512 \-m 65536"
82for character devices (32 bit machine.) These options will not override the
83tape block size found out with an
84.BR mtio (4)
85call. The multiple may be larger then the default if
86.B vol
87can allocate the memory required.
88.SH EXAMPLES
89To back up a tree to floppies as a compressed tarfile:
90.PP
91.RS
92tar cf \- . | compress | vol /dev/fd0
93.RE
94.PP
95To restore a tree from 720 kb images from possibly bigger floppies:
96.PP
97.RS
98vol 720 /dev/fd0 | uncompress | tar xfp \-
99.RE
100.PP
101Read or write a device with 1024 byte blocks:
102.PP
103.RS
104vol \-b 1k /dev/rsd15
105.RE
106.PP
107Read or write a variable block length tape using blocking factor 20 as used
108by default by many
109.BR tar (1)
110commands:
111.PP
112.RS
113vol \-m 20b /dev/rst5
114.RE
115.PP
116Note that
117.B \-m
118was used in the last example. It sets the size to use to read or write,
119.B \-b
120sets the basic block size that may be written in multiples.
121.SH "SEE ALSO"
122.BR dd (1),
123.BR tar (1),
124.BR mt (1),
125.BR mtio (4).
Note: See TracBrowser for help on using the repository browser.