SUT Home

ptcp

SUT copy

Description

ptcp is a utility that performs a one-to-many machine file copy.

Command Line Arguments

ptcp [-all|-m <machine_file>|-M <machine_list>] [-rRfpd] [-o <transfer_option>] <source1> <source2>... <destination>

-m <machine_file>
Specify a file with a list of destination machines. It is incorrect to use this with the -M option. This option must preceed all others.

-M <machine_list>
Specify a list of destination machines. The entire list must be surrounded by quotes. It is incorrect to use this with the -m option. This option must preceed all others.
-r
Copy recursively, copying from pipes. See BUGS below.

-R
Copy recursively, preserving pipes.

-f
Force the copy. Remove any existing destination.

-p
Preserve user, group, times, and permissions of the source(s).

-d
Preserve links.

-o <transfer_option>
The manner in which ptcp transfers files can be configured by specifying any of the following options:

force_compression - ptcp may attempt to use compression if it is available on the host system. Typically, it only compresses when not copying already compressed files. Use this option to force the use of compression.

no_compression - Use this option to disable the use of compression.

no_checking - Normally, ptcp does checking to ensure correct data transmission. Use this option to disable this feature, possibly speeding up transmission.

force_tar - ptcp may use tar to transfer large directories to speed transfers. Use this option to force the use of tar.

no_tar - Use this option to disable the use of tar.

Environment Variables

PT_MACHINE_FILE
If PT_MACHINE_FILE is set, the command will attempt to open the file whose name is stored in PT_MACHINE_FILE. This will be used if neither the -m or -M options are given.

Examples

To copy the directories /home/johndoe/project and /home/johndoe/data from the local machine to the directory /home/johndoe on the machines specified in the file "destination_machines" use

ptcp -m destination_machines -r /home/johndoe/project /home/johndoe/data /home/johndoe

To make the same copy, specifying the machines on the command line, use

ptcp -M "host1 host2 host3" -r /home/johndoe/project /home/johndoe/data /home/johndoe

To copy to similarly named hosts as in the previous example, an abbreviation can be used

ptcp -M "host%d@1-3" -r /home/johndoe/project /home/johndoe/data /home/johndoe

where the %d is replaced by the numbers 1-3 when the copy is performed.

See Also

ptmv(1), ptrm(1), SUT(1)







Contact Emil Ong about issues concerning this page.