Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to copy directory and file structure

Status
Not open for further replies.

plcramer

MIS
Mar 11, 2002
5
US
I have two 9000 servers running 11.0 and I have a need to copy the file and directory structure of one subdirectory to the other machine. What dow I use? Thanks!
 
I would tend to back it up to tape and then recover it onto the other machine, but looking I found this (found and not tested so check it first - I've not a machine at the moment)

Here is an example of copying a directory from one machine to another:

find . -depth -print0 | cpio -0o -Hnewc |
rsh other-machine "cd `pwd` && cpio -i0dum"

Clare

 
An alternative, if you have room, would be to tar up the required directory, compress it and ftp it over to the second, uncompressing and untarring it when it's there and in the correct place in the filesystem. HTH.
 
I will go with Clare's suggestion

#cd /dest_dir
#find . | cpio -o | remsh sys2 "cd /source_dir ; cpio -idumv"

Patel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top