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