System Administration Guide: Basic Administration

Chapter 51 Copying UFS Files and File Systems (Tasks)

This chapter describes how to copy UFS files and file systems to disk, tape, and diskettes by using various backup commands.

This is a list of the step-by-step instructions in this chapter.

Commands for Copying File Systems

When you need to back up and restore complete file systems, use the ufsdump and ufsrestore commands described in Chapter 50, UFS Backup and Restore Commands (Reference). When you want to copy or move individual files, portions of file systems, or complete file systems, you can use the procedures described in this chapter instead of the ufsdump and ufsrestore commands.

The following table describes when to use the various backup commands.

Table 51–1 When to Use Various Backup Commands

Task 

Command 

For More Information 

Back up file systems to tape 

ufsdump

How to Backup a File System to Tape

Create a file system snapshot 

fssnap

Chapter 48, Using UFS Snapshots (Tasks)

Restore file systems from tape 

ufsrestore

How to Restore a Complete File System

Transport files to other systems 

pax, tar, or cpio

Copying Files and File Systems to Tape

Copy files or file systems between disks 

dd

How to Copy a Disk (dd)

Copy files to diskette 

tar

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

The following table describes various backup and restore commands.

Table 51–2 Summary of Various Backup Commands

Command Name 

Aware of File System Boundaries? 

Supports Multiple Volume Backups? 

Physical or Logical Copy? 

volcopy

Yes 

Yes 

Physical 

tar

No 

No 

Logical 

cpio

No 

Yes 

Logical 

pax

Yes 

Yes 

Logical 

dd

Yes 

No 

Physical 

ufsdump/ufsrestore

Yes 

Yes 

Logical 

The following sections describe the advantages and disadvantages of each command. Also provided are step-by-step instructions and examples of how to use the commands.

Copying File Systems Between Disks

Two commands are used to copy file systems between disks:

For more information about volcopy, see the volcopy(1M) man page.

The next section describes how to use the dd command to copy file systems between disks.

Making a Literal File System Copy

The dd command makes a literal (block-level) copy of a complete UFS file system to another file system or to a tape. By default, the dd command copies standard input to standard output.


Note –

Do not use the dd command with variable-length tape drives without first specifying an appropriate block size.


You can specify a device name in place of standard input or standard output, or both. In this example, the contents of the diskette are copied to a file in the /tmp directory:


$ dd < /floppy/floppy0 > /tmp/output.file
2400+0 records in
2400+0 records out

The dd command reports on the number of blocks it reads and writes. The number after the + is a count of the partial blocks that were copied. The default block size is 512 bytes.

The dd command syntax is different from most other commands. Options are specified as keyword=value pairs, where keyword is the option you want to set and value is the argument for that option. For example, you can replace standard input and standard output with this syntax:


$ dd if=input-file of=output-file

To use the keyword=value pairs instead of the redirect symbols in the previous example, you would type the following:


$ dd if=/floppy/floppy0 of=/tmp/output.file

How to Copy a Disk (dd)

  1. Make sure that the source disk and destination disk have the same disk geometry.

  2. Become superuser or assume an equivalent role.

  3. Create the /reconfigure file so the system will recognize the destination disk to be added when it reboots.


    # touch /reconfigure
    
  4. Shut down the system.


    # init 0
    
  5. Attach the destination disk to the system.

  6. Boot the system.


    ok boot
    
  7. Copy the source disk to the destination disk.


    # dd if=/dev/rdsk/device-name of=/dev/rdsk/device-name bs=block-size
    

    if=/dev/rdsk/device-name

    Represents the overlap slice of the master disk device, usually slice 2. 

    of=/dev/rdsk/device-name

    Represents the overlap slice of the destination disk device, usually slice 2. 

    bs=blocksize

    Identifies block size, such as 128 Kbytes or 256 Kbytes. A large block size value decreases the time it takes to copy the disk. 

    For more information, see the dd(1M) man page.

  8. Check the new file system.


    # fsck /dev/rdsk/device-name
    
  9. Mount the destination disk's root (/) file system.


    # mount /dev/dsk/device-name /mnt
    
  10. Change to the directory where the /etc/vfstab file is located.


    # cd /mnt/etc
    
  11. Using a text editor, edit the destination disk's /etc/vfstab file to reference the correct device names.

    For example, change all instances of c0t3d0 to c0t1d0.

  12. Change to the destination disk's root (/) directory.


    # cd /
    
  13. Unmount the destination disk's root (/) file system.


    # umount /mnt
    
  14. Shut down the system.


    # init 0
    
  15. Boot from the destination disk to single-user mode.


    # boot diskn -s
    

    Note –

    The installboot command is not needed for the destination disk because the boot blocks are copied as part of the overlap slice.


  16. Unconfigure the destination disk.


    # sys-unconfig
    

    The system is shut down after it is unconfigured.

  17. Boot from the destination disk again and provide its system information, such as host name, time zone, and so forth.


    # boot diskn
    
  18. After the system is booted, log in as superuser to verify the system information.


    hostname console login:

Example—Copying a Disk (dd)

This example shows how to copy the master disk /dev/rdsk/c0t0d0s2 to the destination disk /dev/rdsk/c0t2d0s2.


# touch /reconfigure
# init 0
ok boot
# dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t2d0s2 bs=128k
# fsck /dev/rdsk/c0t2d0s2
# mount /dev/dsk/c0t2d0s2 /mnt 
# cd /mnt/etc
# vi vfstab
(Modify entries for the new disk)
# cd /
# umount /mnt
# init 0
# boot disk2 -s
# sys-unconfig
# boot disk2

Copying Directories Between File Systems (cpio Command)

You can use the cpio (copy in and out) command to copy individual files, groups of files, or complete file systems. This section describes how to use the cpio command to copy complete file systems.

The cpio command is an archiving program that copies a list of files into a single, large output file. This command inserts headers between the individual files to facilitate recovery. You can use the cpio command to copy complete file systems to another slice, another system, or to a media device, such as a tape or diskette.

Because the cpio command recognizes end-of-media and prompts you to insert another volume, it is the most effective command, other than ufsdump, to use to create archives that require multiple tapes or diskettes.

With the cpio command, you frequently use the ls and find commands to list and select the files you want to copy, and then to pipe the output to the cpio command.

How to Copy Directories Between File Systems (cpio)

  1. Become superuser or assume an equivalent role.

  2. Change to the appropriate directory.


    # cd filesystem1
    
  3. Copy the directory tree from filesystem1 to filesystem2 by using a combination of the find and cpio commands.


    # find . -print -depth | cpio -pdm filesystem2
    

    Starts in the current working directory. 

    -print

    Prints the file names. 

    -depth

    Descends the directory hierarchy and prints file names from the bottom up. 

    -p

    Creates a list of files. 

    -d

    Creates directories as needed. 

    -m

    Sets the correct modification times on directories. 

    For more information, see the cpio(1) man page.

    The files from the directory name you specify are copied. The symbolic links are preserved.

    You might also specify the -u option. This option forces an unconditional copy. Otherwise, older files do not replace newer files. This option might be useful if you want an exact copy of a directory, and some of the files being copied might already exist in the target directory.

  4. Verify that the copy was successful by displaying the contents of the destination directory.


    # cd filesystem2
    # ls
    
  5. If appropriate, remove the source directory.


    # rm -rf filesystem1
    

Example—Copying Directories Between File Systems (cpio)


# cd /data1
# find . -print -depth | cpio -pdm /data2
19013 blocks
# cd /data2
# ls
# rm -rf /data1

Copying Files and File Systems to Tape

You can use the tar, pax, and cpio commands to copy files and file systems to tape. The command that you choose depends on how much flexibility and precision you require for the copy. Because all three commands use the raw device, you do not need to format or make a file system on tapes before you use them.

Table 51–3 Advantages and Disadvantages of tar, pax, and cpio Commands

Command 

Function 

Advantages 

Disadvantages 

tar

Use to copy files and directory subtrees to a single tape. 

  • Available on most UNIX operating systems

  • Public domain versions are readily available

  • Is not aware of file system boundaries

  • Full path-name length cannot exceed 255 characters

  • Does not copy empty directories or special files such as device files

  • Cannot be used to create multiple tape volumes

pax

Use to copy files, special files, or file systems that require multiple tape volumes. Or, use when you want to copy files to and from POSIX-compliant systems 

  • Better portability than the tar or cpio commands for POSIX-compliant systems

  • Multiple vendor support

Same disadvantages as the tar command, except that the pax command can create multiple tape volumes

cpio

Use to copy files, special files, or file systems that require multiple tape volumes. Or, use when you want to copy files from SunOS 5.9 systems to SunOS 4.0/4.1 systems 

  • Packs data onto tape more efficiently than the tar command

  • Skips over any bad spots in a tape when restoring

  • Provides options for writing files with different header formats, such as ( tar, ustar, crc, odc, bar), for portability between different system types

  • Creates multiple tape volumes

The command syntax is more difficult than the tar or pax commands

The tape drive and device name that you use depend on the hardware configuration for each system. For more information about tape device names, see Choosing Which Media to Use.

Copying Files to Tape (tar Command)

Here is information that you should know before you copy files to tape with the tar command:

How to Copy Files to a Tape (tar)

  1. Change to the directory that contains the files you want to copy.

  2. Insert a write-enabled tape into the tape drive.

  3. Copy the files to tape.


    $ tar cvf /dev/rmt/n filenames
    

    c

    Indicates that you want to create an archive. 

    v

    Displays the name of each file as it is archived. 

    f /dev/rmt/n

    Indicates that the archive should be written to the specified device or file. 

    filenames

    Indicates the files and directories that you want to copy. Separate multiple files with spaces. 

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

  4. Remove the tape from the drive. Write the names of the files on the tape label.

  5. Verify that the files you copied are on the tape.


    $ tar tvf /dev/rmt/n
    

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

Example—Copying Files to a Tape (tar)

The following example shows how to copy three files to the tape in tape drive 0.


$ cd /export/home/kryten
$ ls reports
reportA reportB reportC
$ tar cvf /dev/rmt/0 reports
a reports/ 0 tape blocks
a reports/reportA 59 tape blocks
a reports/reportB 61 tape blocks
a reports/reportC 63 tape blocks
$ tar tvf /dev/rmt/0

How to List the Files on a Tape (tar)

  1. Insert a tape into the tape drive.

  2. Display the tape contents.


    $ tar tvf /dev/rmt/n
    

    t

    Lists the table of contents for the files on the tape. 

    v

    Used with the t option, and provides detailed information about the files on the tape.

    f /dev/rmt/n

    Indicates the tape device. 

Example—Listing the Files on a Tape (tar)

The following example shows a listing of files on the tape in drive 0.


$ tar tvf /dev/rmt/0
drwxr-xr-x 1001/10       0 Oct  7 08:18 2003 reports/
-r--r--r-- 1001/10     382 Oct  7 08:18 2003 reports/reportA
-r--r--r-- 1001/10     382 Oct  7 08:18 2003 reports/reportB
-r--r--r-- 1001/10     382 Oct  7 08:18 2003 reports/reportC

How to Retrieve Files From a Tape (tar)

  1. Change to the directory where you want to put the files.

  2. Insert the tape into the tape drive.

  3. Retrieve the files from the tape.


    $ tar xvf /dev/rmt/n [filenames]

    x

    Indicates that the files should be extracted from the specified archive file. All files on the tape in the specified drive are copied to the current directory. 

    v

    Displays the name of each file as it is retrieved. 

    f /dev/rmt/n

    Indicates the tape device that contains the archive. 

    filenames

    Specifies a file to retrieve. Separate multiple files with spaces. 

    For more information, see the tar(1) man page.

  4. Verify that the files are copied.


    $ ls -l 
    

Example—Retrieving the Files on a Tape (tar)

The following example shows how to retrieve all the files from the tape in drive 0.


$ cd /var/tmp
$ tar xvf /dev/rmt/0
x reports/, 0 bytes, 0 tape blocks
x reports/reportA, 0 bytes, 0 tape blocks
x reports/reportB, 0 bytes, 0 tape blocks
x reports/reportC, 0 bytes, 0 tape blocks
x reports/reportD, 0 bytes, 0 tape blocks
$ ls -l

Note –

The names of the files extracted from the tape must exactly match the names of the files that are stored on the archive. If you have any doubts about the names or paths of the files, first list the files on the tape. For instructions on listing the files on the tape, see How to List the Files on a Tape (tar).


Copying Files to a Tape With the pax Command

How to Copy Files to a Tape (pax)

  1. Change to the directory that contains the files you want to copy.

  2. Insert a write-enabled tape into the tape drive.

  3. Copy the files to tape.


    $ pax -w -f /dev/rmt/n filenames
    

    -w

    Enables the write mode. 

    -f /dev/rmt/n

    Identifies the tape drive. 

    filenames

    Indicates the files and directories that you want to copy. Separate multiple files with spaces. 

    For more information, see the pax(1) man page.

  4. Verify that the files are copied to tape.


    $ pax -f /dev/rmt/n
    
  5. Remove the tape from the drive. Write the names of the files on the tape label.

Example—Copying Files to a Tape (pax)

The following example shows how to use the pax command to copy all the files in the current directory.


$ pax -w -f /dev/rmt/0 .
$ pax -f /dev/rmt/0
filea fileb filec

Copying Files to Tape With the cpio Command

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

  1. Change to the directory that contains the files you want to copy.

  2. Insert a write-enabled tape into the tape drive.

  3. Copy the files to tape.


    $ ls | cpio -oc > /dev/rmt/n
    

    ls

    Provides the cpio command with a list of file names.

    cpio -oc

    Specifies that the cpio command should operate in copy-out mode (-o) and write header information in ASCII character format (-c). These options ensure portability to other vendor's systems.

    > /dev/rmt/n

    Specifies the output file. 

    All files in the directory are copied to the tape in the drive you specify, overwriting any existing files on the tape. The total number of blocks that are copied is shown.

  4. Verify that the files are copied to tape.


    $ cpio -civt < /dev/rmt/n
    

    -c

    Specifies that the cpio command should read files in ASCII character format.

    -i

    Specifies that the cpio command should operate in copy-in mode, even though the command is only listing files at this point.

    -v

    Displays the output in a format that is similar to the output from the ls -l command.

    -t

    Lists the table of contents for the files on the tape in the tape drive that you specify. 

    < /dev/rmt/n

    Specifies the input file of an existing cpio archive.

  5. Remove the tape from the drive. Write the names of the files on the tape label.

Example—Copying All Files in a Directory to a Tape (cpio)

The following example shows how to copy all of the files in the /export/home/kryten directory to the tape in tape drive 0.


$ cd /export/home/kryten
$ ls | cpio -oc > /dev/rmt/0
16 blocks
$ cpio -civt < /dev/rmt/0
-r--r--r--    1 kryten   staff         76 Oct  7 08:17 2003, filea
-r--r--r--    1 kryten   staff         76 Oct  7 08:17 2003, fileb
-r--r--r--    1 kryten   staff         76 Oct  7 08:17 2003, filec
drwxr-xr-x    2 kryten   staff          0 Oct  7 08:17 2003, letters
drwxr-xr-x    2 kryten   staff          0 Oct  7 08:18 2003, reports
16 blocks
$

How to List the Files on a Tape (cpio)


Note –

Listing the table of contents on a tape takes a long time because the cpio command must process the entire archive.


  1. Insert an archive tape into the tape drive.

  2. List the files on the tape.


    $ cpio -civt < /dev/rmt/n
    

Example—Listing the Files on a Tape (cpio)

The following example shows how to list the files on the tape in drive 0.


$ cpio -civt < /dev/rmt/0
-r--r--r--    1 kryten   staff         76 Oct  7 08:17 2003, filea
-r--r--r--    1 kryten   staff         76 Oct  7 08:17 2003, fileb
-r--r--r--    1 kryten   staff         76 Oct  7 08:17 2003, filec
drwxr-xr-x    2 kryten   staff          0 Oct  7 08:17 2003, letters
drwxr-xr-x    2 kryten   staff          0 Oct  7 08:18 2003, reports
16 blocks

How to Retrieve All Files From a Tape (cpio)

If the archive was created using relative path names, the input files are built as a directory within the current directory when you retrieve the files. If, however, the archive was created with absolute path names, the same absolute paths are used to re-create the file on your system.


Caution – Caution –

The use of absolute path names can be dangerous because you might overwrite existing files on your system.


  1. Change to the directory where you want to put the files.

  2. Insert the tape into the tape drive.

  3. Extract all files from the tape.


    $ cpio -icvd < /dev/rmt/n
    

    -i

    Extracts files from standard input. 

    -c

    Specifies that the cpio command should read files in ASCII character format.

    -v

    Displays the files as they are retrieved in a format that is similar to the output from the ls command.

    -d

    Creates directories as needed. 

    < /dev/rmt/n

    Specifies the output file. 

  4. Verify that the files were copied.


    $ ls -l
    

Example—Retrieving All Files From a Tape (cpio)

The following example shows how to retrieve all files from the tape in drive 0.


$ cd /var/tmp
cpio -icvd < /dev/rmt/0
answers 
sc.directives 
tests
8 blocks
$ ls -l

How to Retrieve Specific Files From a Tape (cpio)

  1. Change to the directory where you want to put the files.

  2. Insert the tape into the tape drive.

  3. Retrieve a subset of files from the tape.


    $ cpio -icv "*file" < /dev/rmt/n
    

    -i

    Extracts files from standard input. 

    -c

    Specifies that the cpio command should read headers in ASCII character format.

    -v

    Displays the files as they are retrieved in a format that is similar to the output from the ls command.

    "*file"

    Specifies that all files that match the pattern are copied to the current directory. You can specify multiple patterns, but each pattern must be enclosed in double quotation marks. 

    < /dev/rmt/n

    Specifies the input file. 

    For more information, see the cpio(1) man page.

  4. Verify that the files were copied.


    $ ls -l
    

Example—Retrieving Specific Files From a Tape (cpio)

The following example shows how to retrieve all files with the chapter suffix from the tape in drive 0.


$ cd /home/smith/Book
$ cpio -icv "*chapter" < /dev/rmt/0
Boot.chapter 
Directory.chapter 
Install.chapter 
Intro.chapter
31 blocks
$ ls -l

Copying Files to a Remote Tape Device

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

  1. The following prerequisites must be met to use a remote tape drive:

    1. The local host name and optionally, the user name of the user doing the copy, must appear in the remote system's /etc/hosts.equiv file. Or, the user doing the copy must have his or her home directory accessible on the remote machine, and have the local machine name in $HOME/.rhosts.

      For more information, see the hosts.equiv(4) man page.

    2. An entry for the remote system must be in the local system's /etc/inet/hosts file or in the name service hosts file.

  2. To test whether you have the appropriate permission to execute a remote command, try the following:


    $ rsh remotehost echo test
    

    If test is echoed back to you, you have permission to execute remote commands. If Permission denied is echoed back to you, check your setup as described in step 1.

  3. Change to the directory where you want to put the files.

  4. Insert the tape into the tape drive.

  5. Copy the files to a remote tape drive.


    $ tar cvf - filenames | rsh remote-host dd of=/dev/rmt/n obs=block-size
    

    tar cf

    Creates a tape archive, lists the files as they are archived, and specifies the tape device. 

    v

    Provides additional information about the tar file entries. 

    - (Hyphen)

    Represents a placeholder for the tape device. 

    filenames

    Identifies the files to be copied. Separate multiple files with spaces. 

    | rsh remote-host

    Pipes the tar command's output to a remote shell.

    dd of= /dev/rmt/n

    Represents the output device. 

    obs=block-size

    Represents the blocking factor. 

  6. Remove the tape from the drive. Write the names of the files on the tape label.

Example—Copying Files to a Remote Tape Drive (tar and dd)


# tar cvf - * | rsh mercury dd of=/dev/rmt/0 obs=126b
a answers/ 0 tape blocks
a answers/test129 1 tape blocks
a sc.directives/ 0 tape blocks
a sc.directives/sc.190089 1 tape blocks
a tests/ 0 tape blocks
a tests/test131 1 tape blocks
6+9 records in
0+1 records out

How to Extract Files From a Remote Tape Device

  1. Insert the tape into the tape drive.

  2. Change to a temporary directory.


    $ cd /var/tmp
    
  3. Extract the files from a remote tape device.


    $ rsh remote-host dd if=/dev/rmt/n | tar xvBpf -
    

    rsh remote-host

    Indicates a remote shell that is started to extract the files from the tape device by using the dd command.

    dd if=/dev/rmt/n

    Indicates the input device. 

    | tar xvBpf -

    Pipes the output of the dd command to the tar command, which is used to restore the files.

  4. Verify that the files have been extracted.


    $ ls -l /var/tmp
    

Example—Extracting Files From a Remote Tape Drive


$ cd /var/tmp
$ rsh mercury dd if=/dev/rmt/0 | tar xvBpf -
x answers/, 0 bytes, 0 tape blocks
x answers/test129, 48 bytes, 1 tape blocks
20+0 records in
20+0 records out
x sc.directives/, 0 bytes, 0 tape blocks
x sc.directives/sc.190089, 77 bytes, 1 tape blocks
x tests/, 0 bytes, 0 tape blocks
x tests/test131, 84 bytes, 1 tape blocks
$ ls -l

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 19, Formatting 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 the tar(1)man page.

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—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—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.

Examples—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

How to Archive 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).