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