Re: scp an entire directory (265 Views)
Reply
Super Advisor
MikeL_4
Posts: 958
Registered: ‎05-05-2002
Message 1 of 5 (265 Views)
Accepted Solution

scp an entire directory


Can scp be used to copy all files in a directory along with any subdirectories it may have ??
Exalted Contributor
Steven E. Protter
Posts: 33,806
Registered: ‎08-15-2002
Message 2 of 5 (265 Views)

Re: scp an entire directory

cd /directoryname

scp -r * targethost:/target_directory


You also might want to use the switch p as in scp -rp

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Super Advisor
MikeL_4
Posts: 958
Registered: ‎05-05-2002
Message 3 of 5 (265 Views)

Re: scp an entire directory

Thanks, where do you find the man page with the scp options ?? my "man scp" didn't show them ??
Exalted Contributor
Steven E. Protter
Posts: 33,806
Registered: ‎08-15-2002
Message 4 of 5 (265 Views)

Re: scp an entire directory

scp is part of openssh, ported to HP-UX and re-named secure shell.

The product is fully documented at http://www.openssh.org

I find the man page a little lacking as well.

scp /?

provides a little.

The man page is incomplete in my opinion, I agree with you there.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Super Advisor
MikeL_4
Posts: 958
Registered: ‎05-05-2002
Message 5 of 5 (265 Views)

Re: scp an entire directory

Thanks
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.