sdfcp(1)
NAME
sdfcp, sdfln, sdfmv − copy, link, or move files to/from an SDF volume
SYNOPSIS
sdfcp file1 [file2 ...] target
sdfln file1 [file2 ...] target
sdfmv file1 [file2 ...] target
DESCRIPTION
sdfcp, sdfln, and sdfmv are intended to mimic cp(1), mv(1), and ln(1), respectively
An SDF file name is recognized by the embedded colon (:) delimiter (see sdf(4) for SDF file naming conventions).
sdfcp copies an HP-UX file to an SDF file, or an SDF file to either an SDF or HP-UX file. It also copies a list of HP-UX files to an SDF directory, or copies a list of SDF files to either an SDF or HP-UX directory.
sdfln creates links to target if, and only if, all files referenced on the command line are on the same SDF volume.
sdfmv behaves the same way as sdfcp, except that it moves files instead of copying them.
The last name on the argument list is the target file or directory. If two or more files are specified in the command line, not counting target, then target must be a directory. Under no circumstances can any argument other than target be a directory.
The file name − (dash) is interpreted to mean standard input or standard output, depending on the position in the argument list. The use of the file name − is meaningless when using sdfln or sdfmv.
EXAMPLES
The following examples assume that an SDF directory structure exists on the HP-UX device file /dev/rdsk/c2d0s2.
Copy the HP-UX file mydata to the SDF file /users/old/mike/olddata:
sdfcp mydata /dev/rdsk/c2d0s2:/users/old/mike/olddata
Copy SDF file /users/gary/.cshrc to SDF directory /tmp (on the same SDF volume):
sdfcp /dev/rdsk/c2d0s2:/users/gary/.cshrc /dev/rdsk/c2d0s2:/tmp
Copy SDF files /a/b and /a/c to HP-UX directory /users/dave:
sdfcp /dev/rdsk/c2d0s2:/a/b /dev/rdsk/c2d0s2:/a/c /users/dave
Copy standard input to SDF file /users/craig/memo:
sdfcp − /dev/rdsk/c2d0s2:/users/craig/memo
Copy SDF file /etc/rc to SDF file /etc/rc.old on another SDF volume residing in the HP-UX device file /dev/rdsk/c2d1s0:
sdfcp /dev/rdsk/c2d0s2:/etc/rc /dev/rdsk/c2d1s0:/etc/rc.old
Implement a cat(1) program for concatenating SDF files using sdfcp in a shell script:
if [ $# -lt 1 ]
then
echo "Usage: sdfcat file ..."
exit 1
fi
for i in $*
do
sdfcp $i -
done
Link SDF file /tmp/x to /users/gary/x1:
sdfln /dev/rdsk/c2d0s2:/tmp/x /dev/rdsk/c2d0s2:/users/gary/x1
Moves HP-UX file /etc/rc.backup to SDF file /etc/rc:
sdfmv /etc/rc.backup /dev/rdsk/c2d0s2:/etc/rc
Assuming that the current HP-UX directory contains only regular files, move all files in an HP-UX directory to SDF directory /savestuff:
sdfmv * /dev/rdsk/c2d0s2:/savestuff
AUTHOR
sdfcp was developed by HP.
SEE ALSO
Hewlett-Packard Company — HP-UX Release 8.05: June 1991