Operating System - HP-UX
1833770 Members
2145 Online
110063 Solutions
New Discussion

why does this command not work?

 
SOLVED
Go to solution
matthew mills
Frequent Advisor

why does this command not work?

I am trying to copy a directory structure from one HPUX server to another HPUX server. it says it cannot "stat" the file??

remsh ngbva find /release/ -depth -print | cpio -pd /release
10 REPLIES 10
john korterman
Honored Contributor

Re: why does this command not work?

Hi,
does /release exist? I gues that could be the problem.

regards,
John K.
it would be nice if you always got a second chance
Mark Grant
Honored Contributor

Re: why does this command not work?

Because your pipe is happeining on the machine you are running the "remsh" from.

try

remsh ngbva 'find /release/ -depth -print | cpio -pd /release'


Never preceed any demonstration with anything more predictive than "watch this"
Pete Randall
Outstanding Contributor

Re: why does this command not work?

Matthew,

I believe it's usually a permissions issue. Whoever is running the command simply doesn't have permission to read the file.


Pete

Pete
matthew mills
Frequent Advisor

Re: why does this command not work?

Yes there is a directory called "/release" on both servers and Mark's idea did not work, it made a copy of the release directory within the same /release directory. maybe a diff command would be better. I tryed the "dd" command but it would only take single files. please help.
Hoefnix
Honored Contributor
Solution

Re: why does this command not work?

Hi,

if its a permision problem next won't work, but you could try to use next to copy directories(+structure) from one system to the other
rcp -r -p ngbva:/release /release

HTH,
Peter
matthew mills
Frequent Advisor

Re: why does this command not work?

I am executing this as root and I can do single files, but not a directory structure.

Hoefnix
Honored Contributor

Re: why does this command not work?

do you mean that you only can do single files using rcp?
Robert-Jan Goossens
Honored Contributor

Re: why does this command not work?

Hi,

Try something like this,

# find /source | cpio -ov | remsh server " cd /copy ; cpio -idvum "

Robert-Jan
John Carr_2
Honored Contributor

Re: why does this command not work?

Hi the rcp command should work fine for this

on the source server

cd /release

rcp -rp * destination_server:/release

John.
Ryan McKlveen
Advisor

Re: why does this command not work?

if you can remsh to the host - use:
rcp -r -p ngbva:/release /release
or
scp if ssh installed.

Ryan