---
name: "pdcp-ssh"
section: "1"
platform: "linux"
package: "pdsh"
version: "1.7-6-8"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/pdcp-ssh"
---

# pdcp-ssh(1)

copy files to groups of hosts in parallel

." $Id: pdcp.1.in,v 1.16 2002/09/27 14:28:03 grondo Exp $

## NAME

pdcp - copy files to groups of hosts in parallel

## SYNOPSIS

**pdcp** *\[-options\] src \[src2...\] dest*\

## DESCRIPTION

**pdcp** is a variant of the [rcp(1)](/rcp/1.md) command.  Unlike [rcp(1)](/rcp/1.md) which copies files to a single remote host, [pdcp(1)](/pdcp/1.md) can copy files to multiple remote hosts in  parallel.  Options are described in TARGET NODE LIST OPTIONS and OTHER OPTIONS  below.

When pdcp receives SIGINT (ctrl-C), it lists the status of current threads. A second SIGINT within one second terminates the program.

## TARGET NODE LIST OPTIONS

*-w host,host,...* Target the specified hosts.  No spaces are allowed in the comma-separated list.  A list consisting of a single "-" character causes the target  hosts to be read from stdin, one per line.  The host list may contain  hostname ranges of the form \`\`host\[1-5\]''. For more information about hostname ranges, see the HOST RANGES section below.

*-x host,host,...* Exclude the specified hosts.  May be specified in conjunction with other target node list options such as -a. Hostname ranges may also be specified to the -x option (see HOST RANGES section below)

*-a* Target "all" nodes in the cluster. *-g attribute* Target nodes that have the specified genders attribute.

*-i* In conjunction with -a or -g, request canonical hostnames. The default is to use reliable hostnames.

If none of the above options are specified, the WCOLL environment variable must point to a file that contains a list of nodes, one per line.

## OTHER OPTIONS

*-r* Copy recursively.

*-p* Preserve modification time and modes.

*-q* List option values and the target host list and exit without action.

*-f number* Set the maximum number of simultaneous remote copies.  The default is  32.

*-l user* This option may be used to copy files as another user, subject to authorization.  For BSD rcmd, this means the invoking user and system must be listed in the user´s .rhosts file (even for root).

*-t seconds* Set the connect timeout.  Default is 10 seconds.   (This is in concurrent with the normal socket-level timeout).

*-d* Include more complete thread status when SIGINT is received, and display connect and command time statistics on stderr when done.

## HOST RANGES

As noted in sections above,  **pdcp** accepts ranges of hostnames in the general form: prefix\[n-m,l-k,...\], where n \< m and l \< k, etc., as an alternative to explicit lists of hosts.  This form should not be confused with regular expression character classes (also denoted by \`\`\[\]''). For example, foo\[19\] does not represent foo1 or foo9, but rather represents a degenerate range: foo19.

This range syntax is meant only as a convenience on clusters with a prefixNN naming convention and specification of ranges should not be considered necessary -- the list foo1,foo9 could be specified as such, or by the range foo\[1,9\].

Some examples of range usage follow:

Copy /etc/hosts to foo01,foo02,...,foo05\
     pdcp -w foo\[01-05\] /etc/hosts /etc

Copy /etc/hosts to foo7,foo9,foo10\
     pdcp -w foo\[7,9-10\] /etc/hosts /etc

Copy /etc/hosts to foo0,foo4,foo5\
     pdcp -w foo\[0-5\] -x foo\[1-3\] /etc/hosts /etc

## LIMITATIONS

This copy of pdsh has been configured to use **ssh** which causes the stderr of ssh to be folded in with that of the remote  command.  When invoked by pdsh, it is not possible for ssh to prompt for  confirmation if a host key changes, prompt for passwords if RSA keys are not  configured properly, etc..  Finally, the connect timeout is not adjustable  when ssh is used.

## FILES

/usr/bin/ssh\
 /usr/bin/nodeattr\
\
\
 @RCP@\

## ORIGIN

Pdsh/pdcp was originally a rewrite of IBM [dsh(1)](/dsh/1.md) by Jim Garlick\
 \<garlick@llnl.gov\> on LLNL's ASCI Blue-Pacific IBM SP system.   It is now also used on Linux clusters at LLNL.

## SEE ALSO

[rcp(1)](/rcp/1.md), [pdsh(1)](/pdsh/1.md)
