Radhakrishna Benne | 1 Dec 2011 08:35
Favicon

ftps

Hi,

 

I want to use ftps to send the files client system to server system.

Please help me.

 

Thanks & Regards,

Radhakrishna Benne

VoIP: +1.513.723.3750

Mobile: +91 8008143792

Convergys IMG (India) Private Limited,Hyderabad.

 


NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected.
_______________________________________________
lftp mailing list
lftp <at> uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp
Naber, Peter | 1 Dec 2011 12:01
Picon

different function of ls and [re]cls

Hi,

 

the function ls and recls works different with files square brackets are include in the filename.

The ls function works well with the “||” and “&&” operations.

At the example you are able to see, that if the file doesn’t exists the “||” works well by ls, with recls it doesn’t.

By Files without square brackets in the filename the “||” and “&&”works also correctly by cls.

 

 

lftp admin <at> localhost:/Alfresco/tmp> ls subdir1/KW48_Do_N[LIDGWH].pdf

-rw-rw-rw-   1 user group 0 Nov 30 19:09 KW48_Do_N[LIDGWH].pdf        

lftp admin <at> localhost:/Alfresco/tmp> ls -1 subdir1/KW48_Do_N[LIDGWH]x.pdf || echo test

ls: Fatal error: 500 Invalid path

test                                                                                                                                

lftp admin <at> localhost:/Alfresco/tmp> ls -1 subdir1/KW48_Do_N[LIDGWH]x.pdf && echo test

ls: Fatal error: 500 Invalid path

 

lftp admin <at> localhost:/Alfresco/tmp> recls -1 subdir1/KW48_Do_N[LIDGWH].pdf

lftp admin <at> localhost:/Alfresco/tmp>

lftp admin <at> localhost:/Alfresco/tmp> recls -1 subdir1/KW48_Do_N\[LIDGWH].pdf

subdir1/KW48_Do_N[LIDGWH].pdf                                                                                                  

lftp admin <at> localhost:/Alfresco/tmp> recls -1 subdir1/KW48_Do_N\[LIDGWH]x.pdf || echo test

lftp admin <at> localhost:/Alfresco/tmp>                                                                                                

lftp admin <at> localhost:/Alfresco/tmp> recls -1 subdir1/KW48_Do_N\[LIDGWH]x.pdf && echo test

test                                                                                                                               

 

regards,

 

Peter Naber   

                                                                                                                                    

 

 

Peter Naber
Dipl. Inform (FH)


 
alfa Media Partner GmbH
Carl-Zeiss-Straße 27
63322 Rödermark
Germany


Phone:  +49 (0) 6074 / 3104-390
Fax:      +49 (0) 6074 / 3104-112

 

Visit our homepage www.alfamedia.com

Sitz des Unternehmens: Rödermark - AG Offenbach HRB 21171
Geschäftsführer: Jens Emmerich

Diese Nachricht kann vertrauliche Informationen enthalten und ist nur für die namentlich bezeichneten Empfänger bestimmt.
Falls Sie nicht namentlich als Empfänger dieser Mitteilung angeführt sind, bitten wir Sie diese Mitteilung nicht zu kopieren oder weiterzuleiten.
Bitte informieren Sie uns per E-Mail, falls Sie diese Mitteilung fälschlicherweise erhalten haben.

This message may contain confidential information and is intended only for the individual named.
If you are not the named addressee please do not  disseminate, distribute or copy this e-mail.
Please notify the sender by e-mail if you have received this e-mail-message by mistake.

 

_______________________________________________
lftp mailing list
lftp <at> uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp
Simón | 3 Dec 2011 15:00
Gravatar

[Feature request] "cmd:at-finish" or "cmd:at-queue-complete"

Hi,
If I set "set cmd:move-background yes" in my rc file, I queue several downloads and I exit of lftp. The downloads are backgrounded and lftp terminates silently when all downloads are finished. I would like an option to alert me when all downloads are complete.

"set  cmd:at-exit '....'" doesn't work because is executed when I exit of lftp, no when the downloads are finished.

Another option (that actually I use) is create an alias like:
alias finished "!notify-send -i lftp1 -c 'transfer.complete' 'LFTP' 'Transferencias finalizadas'"
and I add this at finish of the queue.
But it requires that I don't forget to add this alias to queue always.

One option much more comfortable it would be to add an option like "cmd:at-finish" or "cmd:at-queue-complete" that it executes when lftp really finish (first command) or when the queue is finished (second command).
Is this possible?
Regards.
_______________________________________________
lftp mailing list
lftp <at> uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp
Simón | 5 Dec 2011 13:18
Gravatar

Feature requests in github?

Hi,
I would to add one feature request in github for LFTP but it's disabled: 
https://github.com/lavv17/lftp/pulls
I think it would be a good idea to enable it.
Regards.
_______________________________________________
lftp mailing list
lftp <at> uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

franck.eyraud | 5 Dec 2011 13:47
Picon

Follow local symlinks when mirroring

Hi lftp list,

I'm using the mirror function of lftp to regularly update a huge amount 
of data. Because of space issues, I need to split the data on several 
volumes, and I use symbolic links (symlinks) to simulate the original 
directory structure. However, in such a situtation, lftp, at mirroring 
time, destroys the existing symlink, recreates the directory and 
downloads its whole content again :

Example, in the below structure, the mirror command destroys symlinks b 
and c (FTP server contains

/mnt/vol1/data
     a
     b -> /mnt/vol2/data/b
     c -> /mnt/vol2/data/c

Transferring file `a/file.ext'
Removing old local file `b'
Making directory `b'
Transferring file `b/file.ext'

Isn't there a way to tell lftp not to delete local symlinks if existing 
and consider them as directory (the normal behaviour when using the 
shell) ? I tried the -L and mirror:dereference options, but I think they 
are only for remote symlinks, not local ones.

For now, to avoid the problem, I have to run the script below, having 
separates commands for any directory represented by a symlink, but I 
don't like it as if I need to split more, I will every time need to 
modify the script:

------
mirror --exclude=b/.* --exclude=c/.*

lcd b #this command follows correctly the local symlink
mirror b .
lcd -

lcd c
mirror c.
lcd -
---------

If it is not yet possible, this would be feature request (I could try to 
contribute, if you think it would require few changes, but I didn't work 
with c/c++ for a long time)

Thank you anyway for this wonderful tool,

Franck
_______________________________________________
lftp mailing list
lftp <at> uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

franck.eyraud | 5 Dec 2011 15:16
Picon

Re: Follow local symlinks when mirroring

On 05/12/2011 13:47, franck.eyraud <at> jrc.ec.europa.eu wrote:
> (I could try to contribute, if you think it would require few changes, 
> but I didn't work with c/c++ for a long time)
I anyway had a curious look at the source code; I noticed at line 349 of 
MirrorJob.cc the following code :

          if(target_is_local && !script_only)
          {
             if(lstat(target_name,&st)!=-1)
             {
                if(S_ISDIR(st.st_mode))
                {
                   chmod(target_name,st.st_mode|0700);
                   create_target_dir=false;
                }
                else
                {
                   Report(_("Removing old local file `%s'"),
                            dir_file(target_relative_dir,file->name));
                   if(remove(target_name)==-1)
                   {
                      eprintf("mirror: remove(%s): 
%s\n",target_name,strerror(errno));
                      goto skip;
                   }
                   create_target_dir=true;
                }
             }
          }

The S_ISDIR at line 353 test doesn't take into acount the case where the 
target file is a link and the links points to a directory, which would 
suits more my case. In fact, since the whole code above is executed only 
when !script_only, I realized that running mirror --script=script.lft 
and then lftp -c script.lftp, it mirrors correctly (but I'm loosing the 
possibility of parallel downloads). So lftp is able to follow the links, 
it is just that is decides a priori to delete them.
However, I'm not quite sure yet how to handle the "target is link and 
link points to a directory" test in C++, and don't have time now.

How that helps,

Franck
_______________________________________________
lftp mailing list
lftp <at> uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

Alexander V. Lukyanov | 6 Dec 2011 07:01
Picon
Gravatar

Re: Follow local symlinks when mirroring

On Mon, Dec 05, 2011 at 03:16:05PM +0100, franck.eyraud <at> jrc.ec.europa.eu wrote:
> On 05/12/2011 13:47, franck.eyraud <at> jrc.ec.europa.eu wrote:
> >(I could try to contribute, if you think it would require few
> >changes, but I didn't work with c/c++ for a long time)
> I anyway had a curious look at the source code; I noticed at line
> 349 of MirrorJob.cc the following code :
>
>          if(target_is_local && !script_only)
>          {
>             if(lstat(target_name,&st)!=-1)

Please try this patch and report if it works well for you.
(use -L option).

--
   Alexander.
diff --git a/src/MirrorJob.cc b/src/MirrorJob.cc
index 4b945d6..af27f39 100644
--- a/src/MirrorJob.cc
+++ b/src/MirrorJob.cc
 <at>  <at>  -348,7 +348,7  <at>  <at>  void  MirrorJob::HandleFile(FileInfo *file)
 	 }
 	 if(target_is_local && !script_only)
 	 {
-	    if(lstat(target_name,&st)!=-1)
+	    if((flags&RETR_SYMLINKS?stat:lstat)(target_name,&st)!=-1)
 	    {
 	       if(S_ISDIR(st.st_mode))
 	       {
 <at>  <at>  -693,7 +693,7  <at>  <at>  int   MirrorJob::Do()
       if(target_is_local)
       {
 	 struct stat st;
-	 if(lstat(target_dir,&st)!=-1)
+	 if((flags&RETR_SYMLINKS?stat:lstat)(target_dir,&st)!=-1)
 	 {
 	    if(S_ISDIR(st.st_mode))
 	    {
_______________________________________________
lftp mailing list
lftp <at> uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp
franck.eyraud | 6 Dec 2011 10:01
Picon

Re: Follow local symlinks when mirroring

On 06/12/2011 07:01, Alexander V. Lukyanov wrote:
> On Mon, Dec 05, 2011 at 03:16:05PM +0100, franck.eyraud <at> jrc.ec.europa.eu wrote:
>
> Please try this patch and report if it works well for you.
> (use -L option).
Yes it works fine on one of the test case I recreated. I will try to 
compile and run in the environment where I really need it, but I think 
it should be fine.

Thank you for your quick answer !

Franck
_______________________________________________
lftp mailing list
lftp <at> uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

franck.eyraud | 6 Dec 2011 11:51
Picon

Re: Follow local symlinks when mirroring

On 06/12/2011 10:01, franck.eyraud <at> jrc.ec.europa.eu wrote:
> On 06/12/2011 07:01, Alexander V. Lukyanov wrote:
>> On Mon, Dec 05, 2011 at 03:16:05PM +0100, 
>> franck.eyraud <at> jrc.ec.europa.eu wrote:
>>
>> Please try this patch and report if it works well for you.
>> (use -L option).
> Yes it works fine on one of the test case I recreated. I will try to 
> compile and run in the environment where I really need it, but I think 
> it should be fine.
I confirm that it works fine also in the real case, thank you for that.

Do you think this patch will be included in next releases ?

Franck

_______________________________________________
lftp mailing list
lftp <at> uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

Alexander V. Lukyanov | 7 Dec 2011 06:03
Picon
Gravatar

Re: Follow local symlinks when mirroring

On Tue, Dec 06, 2011 at 11:51:51AM +0100, franck.eyraud <at> jrc.ec.europa.eu wrote:
> Do you think this patch will be included in next releases ?

Yes, it will.

--

-- 
   Alexander.
_______________________________________________
lftp mailing list
lftp <at> uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Gmane