HP-UX Reference (11i v3 07/02) - 1M System Administration Commands A-M (vol 3)

e
efi_cp(1M) efi_cp(1M)
(Itanium(R)-based Systems Only)
NAME
efi_cp - copy to or from EFI file
SYNOPSIS
efi_cp [ -d devicefile ][
-u ] file1 file2
efi_cp [ -d devicefile ] file1 [file2 ]... dest-directory
efi_cp [ -d devicefile ]
-r file_or_dir1 [ file_or_dir2 ]... dest-directory
DESCRIPTION
efi_cp copies files between HP-UX and EFI file systems.
The EFI file system is based on the FAT file system and used by the Itanium-based system BIOS to locate
an HP-UX bootloader. See efi(4).
Without the -u option, efi_cp copies from an HP-UX file system to the EFI volume specified by
devicefile; in this case, the destination should be relative to the root of the EFI volume specified by
devicefile. Use the -u
option to copy from an EFI file system to an HP-UX file system; with the
-u
option, only a single regular file may be copied at a time.
With two arguments:
If file2 does not exist, efi_cp creates it and copies the contents of file1 into file2.
If file2 exists and is a regular file,
efi_cp deletes the the contents of file2 and copies the contents of
file1 into file2.
If file2 exists and is a directory,
efi_cp creates a copy of file1 in that directory.
With more than two arguments, the final argument must be an existing directory. If any of the other argu-
ments is a directory, you must use the
-r option, which specifies that the source directory and the subtree
rooted there are to be copied to the destination directory.
Options
Options can be used singly or combined in any order before the file names. The space between option and
argument is optional.
-d devicefile devicefile is the device special file of the EFI file system to be copied. Without the
-d
option, efi_cp uses the device file specified in the environment variable
EFI_PARTITION if it is defined. The -d option overrides the EFI_PARTITION
environment variable.
-r Recursively copy the subtree rooted at each source directory to the destination directory.
-u Copy file1 from an EFI volume to file2 in HP-UX file system. file1 should be relative to the
root of the EFI volume specified by devicefile, not to an HP-UX file system. With the
-u
option, only a single regular file may be copied at a time.
RETURN VALUE
efi_cp returns exit code 0 if the copy is successful. Otherwise it prints a diagnostic message and returns
nonzero.
0 Successful completion.
>0 Error condition occurred.
EXAMPLES
All the following examples copy to or from the EFI file system on device /dev/rdsk/c1t4d0s1.
Copy
bootprogram into directory /abc/def in the EFI file system on the specified device:
efi_cp -d /dev/rdsk/c1t4d0s1 bootprogram /abc/def/
Copy all files in current directory into directory /abc/def/ in the EFI file system on the specified device
efi_cp -d /dev/rdsk/c1t4d0s1 * /abc/def/
Copy bootprogram into directory /abc/def/ in the EFI file system on the specified device and
rename it boot1:
efi_cp -d /dev/rdsk/c1t4d0s1 bootprogram /abc/dev/boot1
182 Hewlett-Packard Company 1 HP-UX 11i Version 3: February 2007