Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dscopy(1) — HP-UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cp(1)

proxy(1M)

uucp(1C)

DSCOPY(1)  —  Series 300, 500 and 800 Only

NAME

dscopy − copy files between NS systems

SYNOPSIS

dscopy copydescriptor
 
dscopy -i

DESCRIPTION

Dscopy is a Network File Transfer (NFT) command that allows you to copy files between systems in your network.  Using dscopy you can:
 
(1) Copy files between NS/9000 systems.  Using NFT at your local NS/9000 system, you can copy files to, from and between other NS/9000 (Series 300, 500 and 800) systems in your network.  You cannot copy files between NS/9000 Series 800 and NS/9000 Series 200 systems.
 
(2) Copy files between unlike systems.  Using NFT at your local NS/9000 Series 300, 500, or 800 system, you can copy files to, from and between different types of systems. This man page explains how to use NFT to copy files between NS/9000 Series 300, 500 and 800 systems only. Refer to the NS Cross-System NFT Reference Manual for detailed information about copying files from one type of computer to another. 
 
(3) Copy remote files. You can copy files from your system to a remote node, from a remote node to your system, and between remote systems.  No user intervention at the remote system or systems is required.
 
(4) Translate file attributes.  Translation of file attributes is performed transparently when files are copied between different types of systems.  You can also explicitly convert file attributes.
 
(5) Access remote accounts.  Files under any account can be accessed if you provide the correct login name and password.
 
NFT uses two file copying formats: Transparent Format and Interchange Format.

Transparent Format

Transparent Format is invoked by default whenever the source file and the target file system have the same type of operating system.  Transparent Format does not alter a file’s attributes, but simply copies the file from one system to another.  Some examples of when Transparent Format is used are:
 
(1) When the source file node is an NS/9000 Series 800 system and the target file node is an HP 9000 Series 300 (HP-UX) running NS/9000.
 
(2) When the source and target file nodes are both remote NS/1000 systems and NFT is initiated from the local NS/9000 Series 300 or 800 system.

Interchange Format

When the source and target system are different types of computers (for example, one is an HP 9000 Series 800 and one is an HP 1000 A-Series), files copied from one to the other must be converted to Interchange Format.  Interchange Format consists of a set of attributes that describe a file in a standard way so that it can be understood by any NS system. 
 
Interchange Format is invoked by default whenever you use NFT to copy a file residing on one type of system to a system of another type.  You can also invoke Interchange Format explicitly by specifying one or more of the Interchange Format options when copying a file. You can use the Interchange Format options to give a target file a different set of attributes from those that characterized the source file from which it was copied, even if the files are being copied between computers of the same type.
 
Refer to the NS Cross-System NFT Reference Manual for details about copying files from one type of computer to another using the Interchange Format options. 
 
The file mode assigned to a newly created file is the same as that of the source file if the source and target nodes are both HP-UX systems. The ownership of the new file is set to the user ID used for the target login. If the target file already exists and is write protected for the target file node user ID, dscopy will return an error message.  You must use the Replace option to write to the file.  (The Replace option is described later in this man page.) 
 
Your local HP-UX system will prompt for passwords with the local echo turned off for HP-UX logins if you enter the login name and a colon, but do not enter the password.  The system recognizes the colon as a key to prompt you for the password.  The login name and the password are then passed to the remote computer as two separate entities.
 
Security is different on different NS systems.  Refer to the NS Cross-System NFT Reference Manual for security information if the source or target node is another type of NS system. 
 
The HP-UX signals quit and interrupt can be used during dscopy operations.  The quit signal aborts any transfer in progress and interrupt reports the percentage of completion of the current file transfer. 
 
The dscopy command can be issued either with a copy descriptor or with the -i option.  When the dscopy command is issued with a copy descriptor, the connection established with the target system is terminated after the command is successfully executed.  When the dscopy command is used with the -i option, NFT enters Interactive Mode.  For more information on Interactive Mode, refer to the explanation of the -i option below. 

Parameters

copydescriptor is a string which contains options, the source file and target file node names and the logins and the names of the source and target files. 
 
The syntax of copydescriptor is as follows:
 

[option] [option]... [[snode#]slogin#]sfile [[tnode#]tlogin#]tfile

 
The option parameter can be one or more of the dscopy options.  If multiple options are specified, they must be separated by a space.  Options can be specified in any order.  The dscopy options are described below. 
 
snode is the name of the source node.  An NS node name as a hierarchical structure as follows:
 

node[.domain[.organization]]

 
You may omit the organization, organization and domain, or all parts of the node name.  When the organization, or organization and domain, are omitted, the default is the local organization and/or domain. If the entire node name is omitted, it will default to the local node.
 
slogin is the login and password, if any, at the source node.  The login at HP-UX systems must be in the form
 

userID:password

 
The userID is the login name for the computer.  The password is the password, if any.  The colon and password need not be specified if no password exists for the login.  If the colon is specified but password is not, the local system will prompt you for the password with the local echo turned off.  The login must be separated from the snode and sfile parameters by pound signs (#).  If this parameter is omitted, the source login defaults to your local login. 
 
Login syntax is different on different NS systems.  Refer to the NS Cross-System NFT Reference Manual for the login syntax at other NS systems. 
 
sfile is the path name of the source file.  If the source file is a local file, the path name may start from your current working directory or from the local root directory.  If the source file is a remote HP-UX file, the path name may start from the home directory of the login specified in the slogin parameter, or from the remote root directory.  HP-UX path names can be a maximum of 256 bytes long.  Series 800 computers with HP-UX version A.02.00 or later allow path names up to 1023 bytes long.  NFT does not support the use of HP-UX wild card characters.  Refer to the NS Cross-System NFT Reference Manual for the file name syntax at other NS systems. 
 
tnode is the name of the target node.  An NS node name as a hierarchical structure as follows:
 

node[.domain[.organization]]

 
You may omit the organization, organization and domain, or all parts of the node name.  When the organization, or organization and domain, are omitted, the default is the local organization and/or domain. If the entire node name is omited, it will default to the local node.
 
tlogin is the login and password, if any, at the target node.  The login at HP-UX systems must be in the form
 

userID:password

 
The userID is the login name for the computer.  The password is the password, if any.  The colon and password need not be specified if no password exists for the login.  If the colon is specified but password is not, the local system will prompt you for the password with the local echo turned off.  The login must be separated from the tnode and tfile parameters by pound signs (#).  If this parameter is omitted, the target login defaults to your local login. 
 
Login syntax is different on different NS systems.  Refer to the NS Cross-System NFT Reference Manual for the login syntax at other NS systems. 
 
tfile is the path name of the target file.  If the target file is a local file, the path name may start from your current working directory or from the local root directory.  If the target file is a remote HP-UX file, the path name may start from the home directory of the login specified in the slogin parameter, or from the remote root directory.  HP-UX path names can be a maximum of 256 bytes long.  Series 800 computers with HP-UX version A.02.00 or later allow path names up to 1023 bytes long.  NFT does not support the use of HP-UX wild card characters.  Refer to the NS Cross-System NFT Reference Manual for the file name syntax at other NS systems. 
 
-i specifies that Interactive Mode should be used.  When NFT is used in Interactive Mode, dscopy prompts you for copy descriptors until you enter Control-D to indicate end-of-file. (End-of-file is configurable and may be different for your system.)  After each copy descriptor is executed, the connection between the source and target system is maintained; you do not need to respecify the node names and logins if subsequent copies are between the same two systems.  If you want to change the source and target node from a remote node to the local node, you can add a prefix of # to the local file name.  However, if you want to change the source and/or target nodes to different remote nodes, you must respecify the node names and logins.  Whenever the source or target node specifications are changed, NFT terminates the existing connection and establishes a new connection. 
 
NFT provides eight different options that may be used with the dscopy command.  These options are part of the copy descriptor and precede the file and node specifications. 
 
The dscopy options can be divided into two categories:  Format-Independent and Interchange Format.  The Format-Independent options do not invoke either Interchange Format or Transparent Format.  They can be used when a file is copied in either format and do not affect the attributes of the target file.  The Interchange Format options invoke Interchange Format and allow you to give a target file a different set of attributes from those that characterized the source file from which it was copied. 
 
Although Interchange Format options can be used when copying files between HP-UX systems, they are primarily intended to be used when copying files between unlike systems and will be most useful when used for this purpose.  Using an Interchange Format option when copying a file between HP-UX systems overrides the default file copying format (Transparent Format) and causes the file to be copied in Interchange Format.

Format-Independent Options

The following paragraphs describe the Format-Independent options. 

-p The Print Status option causes the status of dscopy to be printed to the standard output file.  If the -p option is not used, the status is not printed to the standard output file. 

-r The Replace option causes an existing target file to be replaced by the source file.  This option operates differently depending on the source file and target file node configuration.  If both the source and target computer are HP-UX systems, the target file acquires the file mode and ownership of the source file.  If the source file node is an HP-UX system and the target computer is a non-HP-UX system, the target file receives the default file protection and/or ownership of the target logon.  If the source file node is a non-HP-UX system and the target file node is an HP-UX system, the target file acquires the file mode 666 (rw-rw-rw-).  If both the source file and target file nodes are non-HP-UX systems, the target file receives the default file protection of the target logon.  If the -r option is not used and target file already exists and is an HP-UX file, it is automatically overwritten by the source file (unless the target file is write protected for the target node login) and the target file retains the ownership and file mode of the overwritten file.  If the -r option is not used and the target file already exists and it is not an HP-UX file, it is not overwritten and an error is returned. 

-P Series 300 Only.  Prompt for individual file passwords marked with two colon keys.  Dscopy prompts for the password(s) with the local echo turned off.  If a two-colon key is used for a file password, and -P is not specified, the key is interpreted as part of the file name. 
 

Interchange Options

The following paragraphs describe how the Interchange Format options operate when the source and target nodes are both HP-UX systems.  Refer to the NS Cross-System NFT Reference Manual for information on the operation of these options in regard to other NS systems. 

-A The ASCII option is intended to be used when copying files between unlike systems.  It is not useful when used to copy files between HP-UX systems.  Refer to the NS Cross-System NFT Reference Manual for more information. 

-B The Binary option can be used to transfer files containing binary data (formatted in 256-byte records).  This option is not useful when copying files between HP-UX systems unless it is used in conjunction with other Interchange Format options.  (See the descriptions of the Fixed-Length and Record Length options below for more information.) 

-F The Fixed-Length options causes “records” in an HP-UX ASCII source file to be converted to fixed-length “records” in an HP-UX target file.  (An HP-UX “record” is considered to be the data found between ASCII LF characters.)  When the Fixed-Length option is specified, data between ASCII LF characters in the ASCII source file is truncated or padded with ASCII SPACE characters, if necessary, so that the data is 160-bytes long (the default record length).  If the Binary option is used in conjunction with the Fixed-Length option, source file data is divided into records every 256 bytes.  ASCII LF characters found in the source file are considered part of the data.  If the last record is less than 256 bytes, it is padded with ASCII NUL characters. 

-L The Record Length option allows you to change the length of records in an HP-UX ASCII or Binary target file.  (For example, -L80 where 80 is the argument that specifies the record length.)  The Record Length option considers an HP-UX record to be the data found between ASCII LF characters for ASCII files.  The argument specifies the record length and is optional.  If the argument is not provided the default record length is used: 160 bytes for ASCII and 256 bytes for Binary.  If it is zero (0) bytes, it is set to the length of the longest record in the source file.  Data between ASCII LF characters in the source file is truncated, if necessary, so that it is the argument bytes long. 

-d The Delimiter Character option allows you to specify a delimiter character to be inserted after each record in the target file.  (For example, -d012 where 012 is the argument that specifies the delimiter character.)  When the Delimiter Character option is not specified, ASCII LF characters are used as delimiters.  The argument is the delimiter character in its literal form or in its equivalent decimal ASCII value.  The ASCII value must be prefixed by a zero.  The argument is not required. 

-s The Search character option allows you to specify a character to be recognized by NFT as a delimiter character.  (For example, -s012 where 012 is the argument that specifies the delimiter character.)  When the Delimiter Character option is not specified, ASCII LF characters are interpreted as delimiters.  The argument is the search character in its literal form or in its equivalent decimal ASCII value.  The ASCII value must be prefixed by a zero.  The argument is not required. 

DIAGNOSTICS

Error messages are printed to stderr.  These messages are listed in the Using Network Services (NS)/9000 Series 800 and the Using Network Services for the Series 300.  In addition, the exit status values are returned to $status (C-Shell) and $? (Bourne shell, Korn shell).  These are:

0 requested transfer completed successfully

1 source file or source node is inaccessible

2 target file or target node is inaccessible

3 syntax error

4 transfer began, but did not complete successfully

5 internal error

EXAMPLES

In the following example, a remote HP-UX file is copied to the local HP-UX system using Interactive Mode.  After the first file is copied, the connection is used to copy another file between the same two nodes.  (Note that the node name and login parameters for the remote node are omitted in the subsequent command.) 
 

     dscopy -i
     dscopy> remnode1#logname#/users/lab/sfile  /users/testsite/d1file
 
     dscopy> /users/lab/nextfile  /users/testsite/d2file

 
In the next example, the same commands are issued in non-interactive mode.  (Note that the node name and login parameters for the remote node are needed in each command.)
 

     dscopy remnode1#logname#/users/lab/sfile  /users/testsite/d1file
     dscopy remnode1#logname#/users/lab/nextfile  /users/testsite/d2file

DEPENDENCIES

Implemented on the Series 300, 500 and 800 only. 

AUTHOR

HP

SEE ALSO

cp(1), proxy(1M), uucp(1C). 
 

Hewlett-Packard Company  —  May 11, 2021

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