System Administration
Showing results for 
Search instead for 
Do you mean 

scp an entire directory

SOLVED
Go to Solution
Super Advisor

scp an entire directory


Can scp be used to copy all files in a directory along with any subdirectories it may have ??
4 REPLIES
Exalted Contributor Exalted Contributor

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

Re: scp an entire directory

Thanks, where do you find the man page with the scp options ?? my "man scp" didn't show them ??
Highlighted
Exalted Contributor Exalted Contributor

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

Re: scp an entire directory

Thanks