Post Undeleted by choroba
2 added 187 characters in body
source | link

What about just getting the structure and recreating it?

mkdir $( from=/copy/from;
         to=/copy/it/here;
         ssh -q username@192.168.78.331 'find"find /copy/from$from -type d'd" \
         | sed "s=^$from/\?=$to/=" )

I used sed to remove the absolute path prefix and replace it with the target one. Test it with echo instead of mkdir to be sure it does what you want.

Also, I hope you don't use special characters in directory names.

What about just getting the structure and recreating it?

mkdir $( ssh -q username@192.168.78.331 'find /copy/from -type d' )

What about just getting the structure and recreating it?

mkdir $( from=/copy/from;
         to=/copy/it/here;
         ssh -q username@192.168.78.331 "find $from -type d" \
         | sed "s=^$from/\?=$to/=" )

I used sed to remove the absolute path prefix and replace it with the target one. Test it with echo instead of mkdir to be sure it does what you want.

Also, I hope you don't use special characters in directory names.

    Post Deleted by choroba
1
source | link

What about just getting the structure and recreating it?

mkdir $( ssh -q username@192.168.78.331 'find /copy/from -type d' )