HP-UX Reference (11i v1 05/09) - 1M System Administration Commands A-M (vol 3)
d
dcopy(1M) dcopy(1M)
NAME
dcopy - copy HFS file system with compaction.
SYNOPSIS
/usr/sbin/dcopy
[-d][-ffsize[:isize]] [
-F hfs][-scyl:skip][-v][-V
] source_fs destination_fs
DESCRIPTION
The
dcopy command copies an existing HFS file system (source_fs) to a new HFS file system
(destination_fs), appropriately sized to hold the reorganized results. For best results, the source file system
should be a raw device, and the destination file system should be a block device. Always run
dcopy on
unmounted file systems. (In the case of the root file system, copy it to a new minidisk.)
If no options are specified,
dcopy
copies files from source_fs, compressing directories by removing vacant
entries and spacing consecutive blocks in a file by the optimal rotational gap. If options such as
-f or -s
are specified, the destination file system structure will be different from that of the source file system.
dcopy makes the destination file system identical to the source file system and preserves the pack and
volume labels. Thus, to compress a file system without moving it, use
dcopy to copy the files to another
file system and the
dd command to copy the file back (see dd(1)).
Directory compression is accomplished by running
dcopy on the primary copy of the file system and allow-
ing the modified directories to propagate to the other copies of the file system in the normal manner.
Options
dcopy recognizes the following options:
-d Move subdirectories to the beginning of directories.
-ffsize[:isize] Specify the file system size (fsize) and inode-list size (isize) in blocks. If this option is
not specified, the source file-system value is used.
-F hfs Specify the HFS file system type. The type of a file system can be determined with
the
fstyp command (see fstyp(1M)). See DEPENDENCIES.
-scyl:skip Supply device information for creating the best organization of blocks in a file. cyl is
the number of block per cylinder; skip is the number of blocks to skip.
-v Report size of source and destination file system.
-V Echo the completed command line, but performs no other actions. The command line
is generated by incorporating the user-specified options and other information derived
from /etc/fstab . This option allows you to verify the command line.
EXAMPLES
dcopy can be executed with or without options. If no options are specified as in this example, the source
and destination file systems are identical. Any differences between the two file systems lie only in the
available disk space.
dcopy /dev/rdsk/c2d0s4 /dev/dsk/c2d0s5
If options are specified, expect a major difference between the source and destination file system structure:
dcopy -F hfs -f40960:260 -s45:5 -d /dev/rdsk/c2d0s4 /dev/dsk/c2d0s5
WARNINGS
dcopy produces invalid results if run on a mounted file system.
The figures specified in option arguments cannot be smaller than corresponding figures in the source file
system.
DEPENDENCIES
dcopy only operates on HFS file systems.
AUTHOR
dcopy was developed by HP.
SEE ALSO
dd(1), fstyp(1M).
Section 1M−−162 Hewlett-Packard Company − 1 − HP-UX 11i Version 1: September 2005