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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Q: what's the command to ftp a whole Directory??

Status
Not open for further replies.

sammx

Technical User
Jun 30, 2002
25
US
Dear All,
I am a RedHat 9 beginner.
Can anyone answer 2 beginner Q:
1.
I am using SSH to connect my hosting server and log as root. Now I want to use ftp to transfer some big directories from one to the other.
"Put" or "Get" command can only transfer one or multiple files only, not the whole dir.
Can anyone tell me how to do that?

2.
Can I remote Desktop Applications?
ie., using SSH to do the application like Windows Explorer?

Thanks
Sam
 
Use scp rather than ftp. ftp passes passwords in the clear, so you shouldn't use it unless you have an anonymous ftp server.

scp -r

will copy an entire directory structure, encrypting the username, password and data that is transferred.

But there are some ssh exploits, so you are better off forcing no root login. Login as a regular user and then su after you log in. Or better yet, use sudo.


pansophic
 
Hi pansophic ,
Thanks for your reply.
I still don't know what to do.
Let's say if I want to copy an dir "tree"
Is the command like this:
scp -r user@xxx.xxx.xxx.xxx:tree

Can you recommend any good book about RedHat 9?
Thanks
Sam
 
Haven't read a linux book since RedHat 5.

It really depends on the direction of the copy. To copy a directory structure from your client to the server use:

scp -r localdirectory/* user@hostname:.

To copy from the server to your local machine use the following:

scp -r user@hostname:remotedirectory/* .

You can substitute any directory for the "." as it just means "this" directory.


pansophic
 
although feel free to use [tt]mput[/tt] (multiple put) and [tt]mget[/tt] if you're not worried about security.


you can use standard wildcards. if you need to know more, "man mput" may help.


<marc> i wonder what will happen if i press this...[pc][ul][li]please give feedback on what works / what doesn't[/li][li]need some help? how to get a better answer: faq581-3339[/li][/ul]
 
About the book question, there is rute.sf.net. I think it's a good place to start.

The other question you had that I didn't see an answer to was about the Remote Desktop Applications. I don't quite understand the exact thing you are looking for but I guess it's something like Terminal Services or PC Anywhere. If it is then you can use RealVNC.com or VNC for short.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top