2

I'm trying to synchronise one file (among other things) using lftp.

Even though the docs say that

--file=FILE mirror a single file or globbed group (e.g. /path/to/*.txt)

lftp still seems to synchronise all the files of the directory of the passed file.

I'm running this command:

lftp -c "set cmd:fail-exit true; set ftp:ssl-allow no; open gocamping;
mirror --reverse --no-perms --exclude=CVS/ --exclude=.cvsignore --delete --verbose=1 --file='/vol/Grozs/Manas vietnes/gocamping/vietne_050011/www/discounts/aaa.php' --target-directory=~/web/discounts;"

In directory /vol/Grozs/Manas vietnes/gocamping/vietne_050011/www/discounts/ there are also files ooo.php and uuu.php, and all three of them get transferred.

What am I doing wrong?

1 Answer 1

3

Use -i instead. The excludes are not needed.

mirror --reverse --no-perms --delete --verbose=1 -i aaa.php /vol/Grozs/Manasvietnes/gocamping/vietne_050011/www ~/web/discounts

1
  • Oh, yes, it seems that exactly the "exclude" parameters were the culprits (I had them set globally in a script, because they are needed for other items). If I just remove "excludes", then the resulting command works. Not sure what's the difference between "include" and "file" (or "directory") though. Commented Mar 11, 2018 at 13:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .