|Previous||Table of Contents||Next|
Follow these steps to list files that were copied using the tar command:
In this example, the table of contents for the diskette contains two files:
oak% tar tvf /dev/rdiskette rw-rw-rw-6693/1Ø 44Ø32 Apr 23 14:54 1991 evaluation.doc rw-rw-rw-6693/1Ø 43ØØ8 Apr 23 14:47 1991 evaluation.doc.backup oak%
See the tar(1) manual page for more information.
If you need a multiple-volume interchange utility, use cpio. The tar command is only a single-volume utility.
When you copy tar files to a formatted diskette, any files already on the diskette are overwritten. If you want to keep the files already on the diskette and add other files, follow these steps:
NOTE: You can use metacharacters (? and *) as part of the file names you specify. For example, to copy all documents with a .doc suffix, type *.doc as the file name argument.
In this example, one file is appended to the files already on the diskette:
oak% cd /home/winsor oak% tar rvf /dev/rdiskette junk a junk 1 blocks oak% tar tvf /dev/rdiskette rw-rw-rw-6693/1Ø 44Ø32 Apr 23 14:54 1991 evaluation.doc rw-rw-rw-6693/1Ø 43ØØ8 Apr 23 14:47 1991 evaluation.doc.backup rw-rw-rw-6693/1Ø 18 Dec 1Ø 11:36 1991 junk oak% eject oak%
Follow these steps to retrieve files from a diskette:
In this example, all files are copied from the diskette:
oak% cd /home/winsor/Evaluations oak% tar xvf /dev/rdiskette x evaluation.doc, 44Ø32 bytes, 86 tape blocks x evaluation.doc.backup, 43ØØ8 bytes, 84 tape blocks oak% eject oak%
To retrieve individual files from a diskette, type tar xvf /dev/rdiskette filename filename filename ... and press Return. The file names you specify are extracted from the diskette and placed in the current working directory. In this example, all files with the prefix evaluation are copied from the diskette:
oak% cd /home/winsor/Evaluations oak% tar xvf /dev/rdiskette x evaluation.doc, 44032 bytes, 86 tape blocks x evaluation.doc.backup, 43008 bytes, 84 tape blocks oak% eject oak%
The SunOS 4.x bar command is not provided with the SunOS 5.x system software. You can retrieve files from diskettes that were archived using the SunOS 4.x bar command by using the -H bar option to cpio.
NOTE: You can use the -H bar option with -i to retrieve files only. You cannot create files with the bar header option. It is good practice to list the contents of an archive before extracting them.
Follow these steps to retrieve bar files from a diskette:
If you are copying large files or file systems onto diskettes, you will want to be prompted to replace a full diskette with another formatted diskette. The cpio command provides this capability. The cpio options you use are the same as you would use to copy files to tape, except you would specify /dev/rdiskette as the device instead of the tape device name. See "The cpio Command" earlier for information on how to use cpio.
If you want to mount a ufs diskette, you must make a file system on it first:
A ufs file system is created on the diskette:
oak% fdformat Press return to start formatting floppy. ................................................................... oak% su Password: # newfs /dev/rdiskette #
You can format diskettes with the pcfs file system for use with DOS systems. The following sections describe how to format a DOS diskette and how to mount the diskette for use with the SunOS 5.x system software. See Chapter 4, "Administering File Systems," for a description of the pcfs file system.
Follow these steps to format a diskette with the pcfs file system:
CAUTION! Reformatting destroys any files already on the diskette.
oak% fdformat -d Press return to start formatting floppy. .................................................................... oak%
|Previous||Table of Contents||Next|