Initial import from FreeBSD RELENG_4:
[dragonfly.git] / usr.sbin / fdwrite / fdwrite.1
1 .\"
2 .\" ----------------------------------------------------------------------------
3 .\" "THE BEER-WARE LICENSE" (Revision 42):
4 .\" <phk@FreeBSD.org> wrote this file.  As long as you retain this notice you
5 .\" can do whatever you want with this stuff. If we meet some day, and you think
6 .\" this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
7 .\" ----------------------------------------------------------------------------
8 .\"
9 .\" $FreeBSD: src/usr.sbin/fdwrite/fdwrite.1,v 1.12.2.7 2003/03/12 22:08:14 trhodes Exp $
10 .\"
11 .\"
12 .Dd September 16, 1993
13 .Os
14 .Dt FDWRITE 1
15 .Sh NAME
16 .Nm fdwrite
17 .Nd format and write floppy disks
18 .Sh SYNOPSIS
19 .Nm
20 .Op Fl v
21 .Op Fl y
22 .Op Fl f Ar inputfile
23 .Op Fl d Ar device
24 .Sh DESCRIPTION
25 The
26 .Nm
27 utility formats and writes one and more floppy disks.
28 Any floppy disk device capable of formatting can be used.
29 .Pp
30 The
31 .Nm
32 utility will ask the user
33 (on
34 .Pa /dev/tty )
35 to insert a new floppy and press return.
36 The device will then be opened, and queried for its parameters,
37 then each track will be formatted, written with data from the
38 .Ar inputfile ,
39 read back and compared.
40 When the floppy disk is filled, the process is repeated, with the next disk.
41 This continues until the program is interrupted or EOF is encountered on the
42 .Ar inputfile .
43 .Pp
44 The options are as follows:
45 .Bl -tag -width 10n -offset indent
46 .It Fl v
47 Toggle verbosity on stdout.
48 Default is ``on''.
49 After
50 .Ar device
51 is opened first time the format will be printed.
52 During operation progress will be reported with the number of tracks
53 remaining on the current floppy disk, and the letters I, Z, F, W,
54 R and C, which indicates completion of Input, Zero-fill, Format
55 Write, Read and Compare of current track respectively.
56 .It Fl y
57 Don't ask for presence of a floppy disk in the drive.
58 This non-interactive flag
59 is useful for shell scripts.
60 .It Fl f Ar inputfile
61 Input file to read.  If none is given, stdin is assumed.
62 .It Fl d Ar device
63 The name of the floppy device to write to.  Default is
64 .Pa /dev/fd0 .
65 .El
66 .Pp
67 The
68 .Nm
69 utility actually closes the
70 .Ar device
71 while it waits for the user to press return,
72 it is thus quite possible to use the drive for other purposes at this
73 time and later resume writing with the next floppy.
74 .Pp
75 The parameters returned from
76 .Ar device
77 are used for formatting.
78 If custom formatting is needed, please use
79 .Xr fdformat 1
80 instead.
81 .Sh EXAMPLES
82 The
83 .Nm
84 utility
85 was planned as a tool to make life easier when writing a set of floppies,
86 one such use could be to write a tar-archive:
87 .Pp
88 .Dl "tar cf - . | gzip -9 | fdwrite -d /dev/fd0.1720 -v
89 .Pp
90 The main difference from using
91 .Xr tar 1 Ns 's
92 multivolume facility is of course the formatting of the floppies, which
93 here is done on the fly,
94 thus reducing the amount of work for the floppy-jockey.
95 .Sh SEE ALSO
96 .Xr fdformat 1
97 .Sh HISTORY
98 The
99 .Nm
100 utility was written while waiting for ``make world'' to complete.
101 Some of the code was taken from
102 .Xr fdformat 1 .
103 .Sh AUTHORS
104 The program has been contributed by
105 .An Poul-Henning Kamp Aq phk@FreeBSD.org .
106 .Sh BUGS
107 Diagnostics are less than complete at present.
108 .Pp
109 If a floppy is sick, and the
110 .Ar inputfile
111 is seekable, it should ask the user to frisbee the disk, insert
112 another, and rewind to the right spot and continue.
113 .Pp
114 This concept could be extended to cover non-seekable input also
115 by employing a temporary file.
116 .Pp
117 An option (defaulting to zero) should allow the user to ask for
118 retries in case of failure.
119 .Pp
120 At present a suitable tool for reading back a multivolume set
121 of floppies is missing.
122 Programs like
123 .Xr tar 1
124 for instance, will do the job, if the data has not been compressed.
125 One can always trust
126 .Xr dd 1
127 to help out in this situation of course.