lftp は構文の混乱を取り除きます。

lftp は構文の混乱を取り除きます。

その Web サイトで lftp に提供された構文の説明が混乱しています。

-x RX,   --exclude=RX              exclude matching files
-X GP,   --exclude-glob=GP         exclude matching files

ミラーリングプロセスから特定のファイルをどのように除外しますか?

--exclude filea --exclude fileb --exclude filec
--exclude filea fileb filec
--exclude ./filea ./fileb filec

Googleでも検索しましたが、除外の例を見つけることができませんか? !

ベストアンサー1

-x RXと一致するRegular eXpression場合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

ご覧のとおり、私が知っている限りリストを提供できないため、各ファイルタイプに-Xを使用する必要があります。

おすすめ記事