1829625 Members
1878 Online
109992 Solutions
New Discussion

HP-UX and scp

 
Pablo  Arnaldi
Occasional Advisor

HP-UX and scp

Hi!
I'm trying to pass files from one HP-UX 10.20 to another using "scp".
It works fine, but when it tryes to pass special files
( such permissions prw-rw-rw-)
scp stops transfer.
Any one knows how to transfer
special files using scp?
Thanks in advance and best regards!

Pablo
Pablux
5 REPLIES 5
Robin Wakefield
Honored Contributor

Re: HP-UX and scp

Pablo,

You won't be able to scp a named pipe, as it's associated with process interaction, and never "contains" anything on disk. scp will just sit there trying to "read" the file/process connected to the pipe.

Rgds,Robin
Vincente Fernandes
Valued Contributor

Re: HP-UX and scp

I agree with robin, you won't be able to copy named pipe files with scp. You need to create/recreate those files on the destination machine.
A. Clay Stephenson
Acclaimed Contributor

Re: HP-UX and scp

Special files like /dev/dsk/xxxx or /dev/rmt/xxx are in general unique to a platform and what is /dev/rdsk/c1t2d0 on 1 box may not even exist on another machine or be a completely different device.
Named pipes typically don't have the same meaning either.
You really need to exclude the special device files and creat them using mknod. Man 1m mknod for details. You could remsh a mknod command to create these within a script.
If it ain't broke, I can fix that.
Pablo  Arnaldi
Occasional Advisor

Re: HP-UX and scp

I found another way
chek it out.

cd /
tar -cvf - fromdir | ssh site.com 'cd /destdir; tar -xvf -'

It works.
Thank you and best regards
Pablux
A. Clay Stephenson
Acclaimed Contributor

Re: HP-UX and scp

Tar or cpio can certainly be used to create device nodes on a remote system but you must understand what you are doing. If, for example, you overwrite an existing /dev/rmt/0m with another device node with different major and minor device numbers, you have just clobbered your functioning tape drive. Just because a command can be made to work does not mean that it is correct. I'm not saying tthat you are wrong but rather that you need to understand the possible consequences.
If it ain't broke, I can fix that.