JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Devices and File Systems     Oracle Solaris 10 8/11 Information Library
search filter icon
search icon

Document Information

About This Book

1.  Managing Removable Media (Overview)

2.  Managing Removable Media (Tasks)

3.  Accessing Removable Media (Tasks)

4.  Writing CDs and DVDs (Tasks)

5.  Managing Devices (Overview/Tasks)

6.  Dynamically Configuring Devices (Tasks)

7.  Using USB Devices (Overview)

8.  Using USB Devices (Tasks)

9.  Using InfiniBand Devices (Overview/Tasks)

10.  Managing Disks (Overview)

11.  Administering Disks (Tasks)

12.  SPARC: Setting Up Disks (Tasks)

13.  x86: Setting Up Disks (Tasks)

14.  Configuring Oracle Solaris iSCSI Targets and Initiators (Tasks)

15.  The format Utility (Reference)

16.  Managing File Systems (Overview)

17.  Creating and Mounting File Systems (Tasks)

18.  Using The CacheFS File System (Tasks)

19.  Configuring Additional Swap Space (Tasks)

20.  Checking UFS File System Consistency (Tasks)

21.  UFS File System (Reference)

22.  Backing Up and Restoring UFS File Systems (Overview)

23.  Backing Up UFS Files and File Systems (Tasks)

24.  Using UFS Snapshots (Tasks)

25.  Restoring UFS Files and File Systems (Tasks)

26.  UFS Backup and Restore Commands (Reference)

27.  Copying Files and File Systems (Tasks)

Commands for Copying File Systems

Copying File Systems Between Disks

Making a Literal File System Copy

How to Copy a Disk (dd)

Copying Directories Between File Systems (cpio Command)

How to Copy Directories Between File Systems (cpio)

Copying Files and File Systems to Tape

Copying Files to Tape (tar Command)

How to Copy Files to a Tape (tar)

How to List the Files on a Tape (tar)

How to Retrieve Files From a Tape (tar)

Copying Files to a Tape With the pax Command

How to Copy Files to a Tape (pax)

Copying Files to Tape With the cpio Command

How to Copy All Files in a Directory to a Tape (cpio)

How to List the Files on a Tape (cpio)

How to Retrieve All Files From a Tape (cpio)

How to Retrieve Specific Files From a Tape (cpio)

Copying Files to a Remote Tape Device

How to Copy Files to a Remote Tape Device (tar and dd)

How to Extract Files From a Remote Tape Device

Copying Files and File Systems to Diskette

What You Should Know When Copying Files to Diskettes

How to Copy Files to a Single Formatted Diskette (tar)

How to List the Files on a Diskette (tar)

How to Retrieve Files From a Diskette (tar)

Archiving Files to Multiple Diskettes

28.  Managing Tape Drives (Tasks)

Index

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)

  1. Change to the directory that contains the files you want to copy.
  2. Insert a formatted diskette that is not write-protected into the drive.
  3. Make the diskette available.
    $ volcheck
  4. Reformat the diskette, if necessary.
    $ rmformat -U /dev/rdiskette
    Formatting will erase all the data on disk.
    Do you want to continue? (y/n)y
  5. Copy the files to diskette.
    $ tar cvf /vol/dev/aliases/floppy0 filenames

    The file names that you specify are copied to the diskette, overwriting any existing files on the diskette.

  6. Verify that the files were copied.
    $ tar tvf /vol/dev/aliases/floppy0

    For more information on listing files, see How to List the Files on a Diskette (tar).

  7. Remove the diskette from the drive.
  8. Write the names of the files on the diskette label.

Example 27-14 Copying 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)

  1. Insert a diskette into the drive.
  2. Make the diskette available.
    $ volcheck
  3. List the files on a diskette.
    $ tar tvf /vol/dev/aliases/floppy0

Example 27-15 Listing 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)

  1. Change to the directory where you want to put the files.
  2. Insert the diskette into the drive.
  3. Make the diskette available.
    $ volcheck
  4. Retrieve files from the diskette.
    $ tar xvf /vol/dev/aliases/floppy0

    All files on the diskette are copied to the current directory.

  5. Verify that the files have been retrieved.
    $ ls -l
  6. Remove the diskette from the drive.

Example 27-16 Retrieving 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).