REMOTE SERVER
remsh remoteserverhostname -l remoteusername find /tmp/a1/ | cpio -o > /tmp/paketr.cpio
LOCAL SERVER
rcp remoteserverhostname:/tmp/paketr.cpio /tmp/aaa
cpio -idmv < /tmp/paketr.cpio
I’m trying to get and create directory structure from remote server to local server. I can do this with following command list
but I wonder if I can do this with just one command
by running cpio with pass-through mode
remsh remoteserverhostname find /tmp/a1 | cpio -pd /tmp
current </tmp/tmp/a1/b1/y1> newer
current </tmp/tmp/a1/b1/z1> newer
current </tmp/tmp/a1/b2/l2smc> newer
"/tmp/a1/b3": No such file or directory
Cannot stat </tmp/a1/b3>.
0 blocks
So when I try to cpio -pd option , I’m expecting it to create directories for me but it does not.
I was using rcp but its not preserving symbolic links 🙁
What can I do ?
hp-ux
Are you trying to copy just the directory structure (i.e. directories only), or the files too? If copying everything, try:
If just the directories, then use:
(I recommend
sshrather thanremsh, as it’s way more secure, but the same commands ought to work withremshtoo…)