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