Score:0

lftp - how to prevent deleting target files if source is empty

jm flag

I use lftp to mirror remote and local directories:

lftp -e 'mirror --include-glob=*.gz --delete /remote_dir/ /local_dir; bye;' -u username,'password' ftp://remote_ftp;

One thing I cannot figure out is how to prevent deleting local files if a remote source is empty or *.gz files are not presented in the source. Obviously, I can remove the '--delete' option, but I need the local files to be always overwritten.

Any suggestions would be appreciated.

Thanks!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.