Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-09-2012, 07:31 AM
|
#1
|
LQ Newbie
Registered: Aug 2011
Posts: 28
Rep:
|
FTP command with single line
Hi,
There should be a command that enables upload and download files with a single line command. But I cant remember and couldnt be able to find. How can I do that?
Line should be something like that;
ftp 12.12.12.12 username password > file.txt
|
|
|
08-09-2012, 07:32 AM
|
#2
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
^ dont use ftp. you should use scp with keys. e.g.:
Code:
scp user@host.net:/path/to/filename local-file.txt
Last edited by schneidz; 08-09-2012 at 07:33 AM.
|
|
|
08-09-2012, 07:50 AM
|
#3
|
LQ Newbie
Registered: Aug 2011
Posts: 28
Original Poster
Rep:
|
I think scp use ssh protocol? I can only use ftp. And I need printout that how much time this download or upload happen?
|
|
|
08-09-2012, 08:01 AM
|
#4
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,301
|
|
|
|
08-09-2012, 08:17 AM
|
#5
|
LQ Newbie
Registered: Aug 2011
Posts: 28
Original Poster
Rep:
|
Thanks pan64 but this page explains with more than one lines. I need to find with a single line.
|
|
|
08-09-2012, 09:02 AM
|
#6
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,301
|
scripts, and scripts can be invoked in one line. Or you can define functions and call them....
|
|
|
08-09-2012, 09:03 AM
|
#7
|
LQ Newbie
Registered: Aug 2011
Posts: 28
Original Poster
Rep:
|
Thanks but there is command like I wrote with single line. I used it but I cant find right now.
|
|
|
08-09-2012, 09:20 AM
|
#8
|
Member
Registered: Aug 2006
Posts: 609
Rep:
|
I would recommend the ncftp package.
It has ncftpget and ncftpput in it.
This way you can pass every argument to a commandline.
|
|
|
08-09-2012, 09:27 AM
|
#9
|
LQ Newbie
Registered: Aug 2011
Posts: 28
Original Poster
Rep:
|
Deadeyes how may I do this? I can install it but is there any sample command?
|
|
|
08-09-2012, 11:21 AM
|
#10
|
Member
Registered: Aug 2006
Posts: 609
Rep:
|
Quote:
Originally Posted by coolx
Deadeyes how may I do this? I can install it but is there any sample command?
|
ncftpget -u user -p password hostnameorip ...
The man page and google should give you enough info.
|
|
|
08-09-2012, 04:55 PM
|
#11
|
Member
Registered: Jul 2009
Posts: 645
Rep:
|
try using lftp ... works like a charm
|
|
|
All times are GMT -5. The time now is 03:22 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|