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