Copying Files and File Systems to Diskette
Before you can copy files or file systems to diskette, you must format the diskette. For information on how to format a diskette, see Chapter 2, Managing Removable Media (Tasks).
Use the tar command to copy UFS files to a single formatted diskette.
Use the cpio command if you need to copy UFS files to multiple formatted diskettes. The cpio command recognizes end-of-media and prompts you to insert the next diskette.
What You Should Know When Copying Files to Diskettes
For more information, see tar(1).
How to Copy Files to a Single Formatted Diskette (tar)
The following example shows how to copy files named evaluation* to a diskette.
$ cd /home/smith $ volcheck $ ls evaluation* evaluation.doc evaluation.doc.backup $ tar cvf /vol/dev/aliases/floppy0 evaluation* a evaluation.doc 86 blocks a evaluation.doc.backup 84 blocks $ tar tvf /vol/dev/aliases/floppy0
How to List the Files on a Diskette (tar)
The following example shows how to list the files on a diskette.
$ volcheck $ tar tvf /vol/dev/aliases/floppy0 rw-rw-rw-6693/10 44032 Jun 9 15:45 evaluation.doc rw-rw-rw-6693/10 43008 Jun 9 15:55 evaluation.doc.backup $
How to Retrieve Files From a Diskette (tar)
The following example shows how to retrieve all the files from a diskette.
$ cd /home/smith/Evaluations $ volcheck $ tar xvf /vol/dev/aliases/floppy0 x evaluation.doc, 44032 bytes, 86 tape blocks x evaluation.doc.backup, 43008 bytes, 84 tape blocks $ ls -l
The following example shows how to retrieve an individual file from a diskette. The file is extracted from the diskette and placed in the current working directory.
$ volcheck $ tar xvf /vol/dev/aliases/floppy0 evaluation.doc x evaluation.doc, 44032 bytes, 86 tape blocks $ ls -l
Archiving Files to Multiple Diskettes
If you are copying large files onto diskettes, you want to be prompted to replace a full diskette with another formatted diskette. The cpio command provides this capability. The cpio commands you use are the same that you would use to copy files to tape, except you would specify /vol/dev/aliases/floppy0 as the device instead of the tape device name.
For information on how to use the cpio command, see How to Copy All Files in a Directory to a Tape (cpio).