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