LIFCP(1) HP-UX 5.0 LIFCP(1) NAME lifcp - copy to or from LIF files SYNOPSIS lifcp [-Txxx] [-Lxxx] [-vxxx] [-b] [-ixxx] [-r] [-t] file1 file2 lifcp [-Txxx] [-Lxxx] [-vxxx] [-b] [-ixxx] [-r] [-t] file1 [file2 ...] directory HP-UX COMPATIBILITY Level: HP-UX/NUCLEUS Origin: HP DESCRIPTION Lifcp copies a LIF file to an HP-UX file, an HP-UX file to a LIF file, or a LIF file to another LIF file. It also copies a list of (HP-UX/LIF) files to a (LIF/HP-UX) directory. The last name on the argument list is the destination file or directory. Options may appear singly or be combined in any order before the file names. The space between option and argument is optional. -T xxx Used only when copying files to a LIF volume. This option will force the file type of the LIF directory entry to be set to the argument given, which may be decimal, octal or hex in standard "C" notation. -L xxx Used only when copying files to a LIF volume. This option will set the "last volume flag" to xxx (0 or 1). The default "last volume flag" is one. -v xxx Used only when copying files to a LIF volume. This option will set the "volume number" to xxx. The default "volume number" is one. -b This option will force a BINARY mode of copying regardless of the file type. When copying in BINARY mode from HP-UX to LIF the default file type is BINARY(-2). (For details on available modes of copying refer to LIF(5)). This option is a no-op when copying from LIF to LIF. -i xxx Used only when copying files to a LIF volume. This option sets the "implementation" field of the LIF directory entry to the argument given, which may be decimal, octal or hex in standard "C" notation. The "implementation" field can only be set for file types -2001 to -100000 (octal). The "implementation" field is set to zero for all interchange file types and for file types -2 to -200 (octal). -r This option will force a RAW mode of copying regardless of the file type. When copying in RAW mode from HP-UX to LIF the default file type is BIN(- 23951). -T option will override the default file type. (various modes of copying are explained in LIF(5).) This option is a no-op in case of LIF to LIF copying. -t will cause the HP-UX file names to be translated to a name acceptable by a LIF utility. That is, all the lower-case letters will be up-shifted and all other characters except numeric will be changed to an underscore (_). If the HP-UX file name starts with a non-letter, the file name will be preceded by the capital letter (X). Note that if there are two files named colon (:) and semicolon (;), both of them will be translated to X_. File names will be truncated to a maximum of 10 characters. When copying a LIF file to (HP-UX/LIF) file -t is a no-op. Omitting -t will cause error to be generated if an improper name is used. The default copying modes when copying from LIF to HP-UX are summarized in the following table: file type default copying mode ASCII ASCII BINARY BINARY BIN RAW other RAW When copying from HP-UX to LIF, the default copying mode is ASCII and an ASCII file is created. When copying from LIF to LIF, if no options are specified then all the LIF directory fields and content of the file are duplicated from source to destination. A LIF file name is recognized by the embedded colon (:) delimiter (see lif(5) for LIF file naming conventions). A LIF directory is recognized by a trailing colon. If an HP- UX file name containing a colon is used, the colon must be escaped with two backslash characters (\\) (the shell removes one of them). The file name `-' (dash) will be interpreted to mean standard input or standard output, depending on its position in the argument list. This is particularly useful if the data requires non-standard translation. When copying from standard input, if no other name can be found, the name "STDIN" is used. The LIF file naming conventions are known only by the LIF utilities. Since file name expansion is done by the shell, this mechanism cannot be used for expansion of LIF file names. Note that the media should not be mounted while using lifcp. EXAMPLES lifcp abc lifvol:CDE copy HP-UX file abc to LIF file CDE on LIF volume lifvol which is actually an HP-UX file initialized to be a LIF volume. lifcp -t * ../lifvol: will copy all the HP-UX files in the current directory to the LIF volume lifvol which is present in the parent directory. File names are translated to appropriate LIF file names. lifcp -r -T 5555 -t *.o lifvol: will copy all the HP-UX object files in the current directory to the LIF volume lifvol. Copying mode is RAW and LIF file types are set to 5555. lifcp -b *.o lifvol: All the object files in the current directory are copied to the LIF volume lifvol. Copying mode is BINARY and LIF BINARY files are created. lifcp -r -t * /lifvol: All the files in the current directory are copied to the LIF volume lifvol in root directory. Copying mode is RAW and LIF file types are set to BIN. lifcp abc\\: lifvol:CDE copy file abc: to LIF file CDE in lifvol. lifcp -t abc def lifvol: copy files abc and def to lif files ABC and DEF within lifvol. lifcp lifvol:ABC . copy LIF file ABC within lifvol to file ABC within current directory. lifcp - /dev/fd.0:A_FILE copy standard input to LIF file A_FILE on LIF volume /dev/fd.0. lifcp lifvol:ABC /dev/fd.0:CDE copy LIF file ABC in lifvol to LIF file CDE on /dev/fd.0. pr abc | lifcp - lifvol:ABC copy the output of pr to the LIF file ABC. pr abc | lifcp - lifvol: copy the output of pr to the LIF volume lifvol. LIF file STDIN is crated since no files names are specified. lifcp lifvol:ABC - copy LIF file ABC in lifvol to standard out. lifcp * ../lifvol: copy all files within current directory to LIF files of the same name on LIF volume lifvol (may cause errors if file names in the current directory do not obey LIF naming conventions!). SEE ALSO lif(5), lifinit(1), lifls(1), lifrename(1), lifrm(1). DIAGNOSTICS Lifcp returns exit code 0 if the file is copied successfully. Otherwise it prints a diagnostic and returns non-zero.