lftp 排除语法混淆

use*_*390 6 regular-expression wildcards lftp

我对他们网站上为 lftp 给出的语法描述感到困惑:

-x RX,   --exclude=RX              exclude matching files
-X GP,   --exclude-glob=GP         exclude matching files
Run Code Online (Sandbox Code Playgroud)

我如何在镜像期间排除某些文件?

--exclude filea --exclude fileb --exclude filec
--exclude filea fileb filec
--exclude ./filea ./fileb filec
Run Code Online (Sandbox Code Playgroud)

我也用谷歌搜索过,但找不到任何排除语句的例子?!

not*_*bit 7

-x RX用于匹配使用 a Regular eXpression,如 in egrep(),而-X GX用于Glob Pattern匹配,除了*之外,它本质上只是普通的字符匹配。例如:

# To exclude .svn directories use:
mirror -e -x ^\.svn/$ /myhome/ /elsewhere

# To exclude all folders starting with a dot:
mirror -e -x /\..+/$ /myhome/ /elsewhere

# To exclude all *.bin AND *.so files:
mirror -e -X *.bin -X *.so /myhome/ /elsewhere
Run Code Online (Sandbox Code Playgroud)

如您所见,您必须对每种文件类型使用 -X,因为您无法提供列表,afaik。