FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 01-26-2010, 06:06 PM
"nate"
 
Default Auto exit lftp on bash script

Alan Hoffmeister wrote:
> Em 26/01/2010 16:54, Akemi Yagi escreveu:
>> lftp -u user,password -e "mirror --reverse --delete --only-newer
>> > --verbose /var/bkp /test_bkp" somehost.com
> Already tryed the && exit, but no sucess...

try ncftpput instead?

http://www.ncftp.com/ncftp/doc/ncftpput.html

"The purpose of ncftpput is to do file transfers from the
command-line without entering an interactive shell. This lets
you write shell scripts or other unattended processes that can
do FTP. It is also useful for advanced users who want to send
files from the shell command line without entering an interactive
FTP program such as ncftp. "

nate


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-26-2010, 06:11 PM
Alan Hoffmeister
 
Default Auto exit lftp on bash script

> try ncftpput instead?
>
> http://www.ncftp.com/ncftp/doc/ncftpput.html
>
> "The purpose of ncftpput is to do file transfers from the
> command-line without entering an interactive shell. This lets
> you write shell scripts or other unattended processes that can
> do FTP. It is also useful for advanced users who want to send
> files from the shell command line without entering an interactive
> FTP program such as ncftp. "
>
> nate
>
>
>

Yeah, but lftp do sync, that's my point.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-26-2010, 06:43 PM
Benjamin Donnachie
 
Default Auto exit lftp on bash script

2010/1/26 Alan Hoffmeister <alangtk@gmail.com>:
> how can I exit lftp and finish the bash?

Use the -c flag instead?

>From the manpage:

-c commands
Execute the given commands and exit. Commands can be
separated with a semicolon, `&&' or `||'.

Ben
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-26-2010, 06:45 PM
Les Mikesell
 
Default Auto exit lftp on bash script

On 1/26/2010 1:11 PM, Alan Hoffmeister wrote:
>
>> try ncftpput instead?
>>
>> http://www.ncftp.com/ncftp/doc/ncftpput.html
>>
>> "The purpose of ncftpput is to do file transfers from the
>> command-line without entering an interactive shell. This lets
>> you write shell scripts or other unattended processes that can
>> do FTP. It is also useful for advanced users who want to send
>> files from the shell command line without entering an interactive
>> FTP program such as ncftp. "
>>
>> nate
>>
>>
>>
>
> Yeah, but lftp do sync, that's my point.

Rsync will do it better, if that's an option at the other end. Wget also
has a mirroring mode.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-27-2010, 02:56 PM
Henrik
 
Default Auto exit lftp on bash script

On 2010-01-26 19:24, Alan Hoffmeister wrote:
> #####################
> #lftp will make the backup
> lftp -u user,password -e "mirror --reverse --delete --only-newer
> --verbose /var/bkp /test_bkp" somehost.com>> $LOGFILE
>
>
;quit does work in my script:
lftp -e 'put 'some.file';quit' -p 21 -u user,pass 1.1.1.1
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-27-2010, 03:34 PM
Alan Hoffmeister
 
Default Auto exit lftp on bash script

Em 27/01/2010 13:56, Henrik escreveu:
> On 2010-01-26 19:24, Alan Hoffmeister wrote:
>
>> #####################
>> #lftp will make the backup
>> lftp -u user,password -e "mirror --reverse --delete --only-newer
>> --verbose /var/bkp /test_bkp" somehost.com>> $LOGFILE
>>
>>
>>
> ;quit does work in my script:
> lftp -e 'put 'some.file';quit' -p 21 -u user,pass 1.1.1.1
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
You mean:

lftp -e "mirror --reverse --delete --only-newer --verbose /var/bkp
/test_bkp ;quit" -u user,password somehost.com

??
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-27-2010, 04:55 PM
Benjamin Donnachie
 
Default Auto exit lftp on bash script

2010/1/27 Alan Hoffmeister <alangtk@gmail.com>:
> lftp -e *"mirror --reverse --delete --only-newer --verbose /var/bkp
> /test_bkp ;quit" -u user,password somehost.com

Read the manpage. Replace -e in your original command line with -c.

Ben
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 01:20 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org