LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-12-2012, 01:18 PM   #1
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266

Rep: Reputation: 19
ftp command line client - run multiple ftp commands in one line


Hi,

I would like to connect to my SFTP server using command line client.
I have just installed key so I dont need a password to login.

The problem is that I have to some ftp client in my backup script but I dont know which one can do this.

Is there any linux ftp client which can run a queue of tasks on SFTP server ?
I have found lftp but I dont know how to use it. Manual is not human readable.

I`m looking for something like this:

lftp -u ftp_user host_name -c mkdir first_folder mkdir second_folder mkdir third_folder

Someclient which can execute a lot of commands in one line.

Maybe somebody knows how to do it ?
 
Old 09-13-2012, 06:24 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
so FTP is **NOT** SFTP, it really is important that you understand the difference. lftp handles both though, so that's OK

So from the manpage:
Quote:
-c commands
Execute the given commands and exit. Commands can be separated with a semicolon, `&&'
or `||'. Remember to quote the commands argument properly in the shell. This option
must be used alone without other arguments.

Last edited by acid_kewpie; 09-13-2012 at 06:27 AM.
 
  


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
multiple ftp commands in 1 line hiddendragon Linux - Server 2 10-30-2011 12:17 PM
FTP Command Line (Scripting Multiple FTP gets) Critcho Linux - Software 3 01-04-2007 11:57 PM
Using FTP to execute command line commands remotely steve_2010 Solaris / OpenSolaris 4 02-13-2004 08:44 AM
Command Line FTP Client Donald1000 Linux - Software 3 09-19-2003 11:06 AM
command line ftp client keevitaja Linux - Software 2 09-12-2002 04:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:32 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