[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

copying files

Posted on 2000-01-28
7
Medium Priority
?
236 Views
Last Modified: 2010-08-27
Hi,

Is it possible to ftp total directory and its subdirectories from one system to other and is it possible to 'rcp' directories and its subdirectories to other systems. If possible, can you please let me know how to do this.

Thanks,

Sreeram.
0
Comment
Question by:sreeramreddy
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2400104
Yes, it's possible to copy directories with ftp, but you have to have a client that supports recursive gets/puts. NcFTP (www.ncftp.com) is a command line utility that can do it, also wget can be used for recursive copies and I imagine that there are others.

As far as I know rcp can't do recursive copies, at least I've never encounterd an rcp implementation that could. You can use tar and rsh to move directory trees between systems, as in:

tar cf - some-dir | rsh remote-sys tar xf -
0
 

Accepted Solution

by:
kotamraju earned 40 total points
ID: 2482728
Sreeram:
you can do that using an -r option with rcp.  -r option will copy all the subtrees under the directory.  But make sure that you have the same login/password  on both the systems and also check whether you made an entry in .netrc file.

0
 
LVL 40

Expert Comment

by:jlevie
ID: 2482799
jlevie changed the proposed answer to a comment
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:sreeramreddy
ID: 2482851
Hi,

can you please tell me what entry should be there in .netrc file and where can I find this file on Solaris system.


Thanks,


Sreeram.
0
 

Expert Comment

by:kotamraju
ID: 2483006
Sreeram:
I'm not very sure about the solaris system but it should present in your home directory.  If its not found then create a file using vi command.

the contents of the file should be
machine <systemname or ip address> login <login name> password <password>.

These files should present on both the systems.
0
 
LVL 21

Expert Comment

by:tfewster
ID: 2483306
Actually, it's the .rhosts file you need to set up for rcp/rsh/rlogin: Make sure the system you are copying FROM has a .rhosts file in your home directory there. The file should contain the hostname of the system you are initiating the rcp on.  

..netrc MUST be readable by the owner only, or FTP will refuse to use it (a security measure against people leaving passwords lying around where anyone can see them). I have only ever seen .netrc used as an FTP "script", e.g.
machine foo login tim password in_your_dreams
get filename
get another_filename
..
..
..


Basically, .rhosts tells the server which remote systems are "trusted" to allow remote commands to be run.
(man rhosts / man netrc for more info. on the format & uses of the files)

0
 

Author Comment

by:sreeramreddy
ID: 2483835
Hi,

rcp -r is working fine with out modifying or creating any .xx files, only thing is I have to type password every time.

Thanks,

Sreeram
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question