LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-08-2008, 02:17 AM   #1
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Rep: Reputation: 30
ftp - mput help needed


I have a large directory with multiple subdirectories on my local computer that I'd like to put on an ftp server.

I can do it only from a terminal (no GUI). So I am trying to use mput instead of just put. However, when I use mput /dirname, mput asks 'y' or 'n' for each file. Is there a way to use mput in 'quiet' mode, or use an alternate single command that will not ask me any y/n question?

Last edited by concoran; 05-08-2008 at 02:18 AM.
 
Old 05-08-2008, 03:02 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If you want to upload multiple files at once you can use:
Code:
prompt off
before the mput command.
If you want to upload multiple subdirs you need another ftp client, like ncftp that comes with most linux distros.

Regards
 
Old 05-08-2008, 03:31 AM   #3
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Original Poster
Rep: Reputation: 30
ah, I don't have root access to the machine, so can't install ncftp.
But ftp has been around forever, but when I log in using ftp, hasn't there a simple way to give a command like 'mput options /dirname' that can simply upload the whole enchilada?
 
Old 05-08-2008, 03:43 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can install ncftp in your home directory if you want.
You can also try to use scp, or rsync that support recursive directory uploads.
 
Old 05-08-2008, 04:11 AM   #5
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by bathory View Post
You can install ncftp in your home directory if you want.
You can also try to use scp, or rsync that support recursive directory uploads.
First question: How to install it in my home directory only?


Second : I am not aware of scp or rsync ; or how to install those (preferably in my own dir).
Can someone please enlighten? From your comments, bathory, it looks like rsync may be a better solution, in that it appears to sync folders rather than just ftp. It's important to me because if connection gets broken or ftp stops in the middle, I would like to synch rather than copy all over again. Can someone pls help? Thanks.

Last edited by concoran; 05-08-2008 at 04:30 AM.
 
Old 05-08-2008, 04:55 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
1st. If you cannot install it using your distro's package manager since you don't have root access, you can try to compile the ncftp source code.

2nd. scp and rsync are also installed by default in most distros. But keep in mind that the box you're trying to upload files must run sshd or rsyncd daemons in order to be able to use these tools.
 
Old 05-08-2008, 05:08 AM   #7
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Original Poster
Rep: Reputation: 30
Well, The remote server is running Redhat 4(or 5). I am running Filezilla ftp server on my Windows machine. My initial thought was that I would ftp my remote dir structure to my local machine using 'mput', but can't seem to. Is it possible without too many complications?

Last edited by concoran; 05-08-2008 at 05:14 AM.
 
Old 05-08-2008, 05:36 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Why don't you use a windows client to download what you want from the Linux box?
 
Old 05-08-2008, 05:41 AM   #9
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by bathory View Post
Why don't you use a windows client to download what you want from the Linux box?
Router problem. Getting someone to open up the ports is close to impossible if I want to use an ftp client on my windows machine. I would rather have a program (such as mput) running on the server that would log into my machine and copy files to my ftp server.

Last edited by concoran; 05-08-2008 at 05:53 AM.
 
Old 05-08-2008, 05:58 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Perhaps you can try to install http://itefix.no/cwrsync/ that is an rsync server for windows and use rsync from the Linux box.
 
Old 05-08-2008, 06:08 AM   #11
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Original Poster
Rep: Reputation: 30
I suspect I did not make clear how it's supposed to work.

- I have an ftp server (machine 1).
- My files are located on a remote Redhat server (machine 2) to which I have terminal access. I can log into it. From terminal, I can ftp machine 1.
- I need to enter some sort of a command (like mput) on machine 2 which will copy all the files/folders to machine 1 without prompting for 'y' or 'n' for each file.

Is it possible? Or is it possible, at least, by installing an application locally? I do not have root access to machine 2.

Last edited by concoran; 05-08-2008 at 06:36 AM.
 
Old 05-08-2008, 07:14 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can either install cwrsync or just openssh for windows in machine 1 and use rsync or scp from macune2 (Linux box),
or install ncftp in your homedir in machine 2 and use ncftp to transfer files to your windows box (machine 1). I don't see any other alternative.
Or try to fix the router if the problem is in your side.
Another possibility is that you make a tar archive of everything you want in machine 2 and then upload the tar file to machine 1.

BR

Last edited by bathory; 05-08-2008 at 08:13 AM.
 
Old 05-08-2008, 03:02 PM   #13
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Original Poster
Rep: Reputation: 30
Thanks, I am finally able to install (having recd root access) ncftp, and able to upload the files.
 
Old 05-09-2008, 11:33 PM   #14
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Original Poster
Rep: Reputation: 30
Update: I figured out bgput. So please ignore post below.

I have another question.

Here's the setup.
Machine 1 : Home machine. (Windows)
Machine 2 : Remote Machine with my directory (source files) running redhat 5.
Machine 3 : FTP Server (destination for my files).


From 1, I log into 2 using putty. I start ncftp and start upload process. The problem here is that I need to keep machine 1 running all the time until ftp is complete even though it's functionally not doing anything except run putty. The upload process takes a few hours. I want to see if I can somehow kick start ncftp job on machine 2 and let it run in background so I can shutdown the home machine? I know you can always run a program in background in Unix, but ncftp has its own prompt.

Last edited by concoran; 05-09-2008 at 11:44 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ftp mput only transfer one file, then close connection jie Linux - Newbie 0 03-13-2008 10:10 PM
ftp with mput tijo.thomas Linux - Software 1 03-05-2006 11:42 PM
Cannot mput/mget/ls in a ftp server ... But can login to it!!!! tuxfood Linux - Networking 1 12-03-2005 07:11 PM
mput all in ftp snoble Linux - Software 0 11-02-2004 04:36 PM
Why we use bin before mget and mput during ftp indian Linux - General 1 09-04-2004 11:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration