remote cpio copy

Posted by soField on Stack Overflow See other posts from Stack Overflow or by soField
Published on 2010-06-03T10:40:12Z Indexed on 2010/06/03 10:44 UTC
Read the original article Hit count: 408

Filed under:
remsh remoteserverhostname -l remoteusername find /tmp/a1/ | cpio -o > /tmp/paketr.cpio
rcp remoteserverhostname:/tmp/paketr.cpio /tmp/aaa
cpio -idmv < /tmp/paketr.cpio

i'am 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 am expecting it to create directories for me but it does not

what can i do ?

© Stack Overflow or respective owner

Related posts about unix