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