Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sdfcp(1) — HP-UX 5.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sdf(4)

cp(1)

SDFCP(1)  —  HP-UX

Series 300, 800 Only

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, sdfmv are intended to mimic cp(1).

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 may 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 "-" makes no sense for sdfln and sdfmv.

EXAMPLES

The examples that follow assume that an SDF directory structure exists on the HP-UX device file /dev/rdsk/c2d0s2. 

The first example copies the HP-UX file mydata to the SDF file /users/old/mike/olddata:

sdfcp mydata /dev/rdsk/c2d0s2:/users/old/mike/olddata

The second example copies the SDF file /users/gary/.cshrc to the SDF directory /tmp (on the same SDF volume):

sdfcp /dev/rdsk/c2d0s2:/users/gary/.cshrc /dev/rdsk/c2d0s2:/tmp

The third example copies the SDF files /a/b and /a/c to the HP-UX directory /users/dave:

sdfcp /dev/rdsk/c2d0s2:/a/b /dev/rdsk/c2d0s2:/a/c /users/dave

The fourth example copies standard input to the SDF file /users/craig/memo:

sdfcp − /dev/rdsk/c2d0s2:/users/craig/memo

The fifth example copies the SDF file /etc/rc to the 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

The sixth example shows how you can 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

The seventh example links the SDF file /tmp/x to /users/gary/x1:

sdfln /dev/rdsk/c2d0s2:/tmp/x /dev/rdsk/c2d0s2:/users/gary/x1

The eighth example moves the HP-UX file /etc/rc.backup to the SDF file /etc/rc:

sdfmv /etc/rc.backup /dev/rdsk/c2d0s2:/etc/rc

Assuming that the current HP-UX directory contains only regular files, the ninth example shows how to move all files in an HP-UX directory to the SDF directory /savestuff:

sdfmv * /dev/rdsk/c2d0s2:/savestuff

AUTHOR

Sdfcp was developed by the Hewlett-Packard Company. 

SEE ALSO

sdf(4), cp(1). 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026