gracetory’s blog

東池袋にある合同会社グレストリのエンジニアブログです

rsyncでcoreディレクトリが転送されない

f:id:grnishi:20171101164622j:plain

今日は短文です。

何が起きたか

rsyncで「core」というディレクトリが転送されていなかった。

理由は何なのか

-Cオプションが指定されていた。

-Cオプションは

$> rsync -h
~前略~
-C, --cvs-exclude           auto-ignore files in the same way CVS does
~後略~

との事で、バージョン管理系の.svnとか.gitとか除外に使っていて気にしていなかったのですが、

$> man rsync
~前略~
       -C, --cvs-exclude
              This is a useful shorthand for excluding a broad range of files that  you  often  don’t
              want  to transfer between systems. It uses a similar algorithm to CVS to determine if a
              file should be ignored.

              The exclude list is initialized to exclude the following items (these initial items are
              marked as perishable ― see the FILTER RULES section):

                     RCS  SCCS  CVS  CVS.adm RCSLOG cvslog.* tags TAGS .make.state .nse_depinfo *~ #*
                     .#* ,* _$* *$ *.old *.bak *.BAK *.orig *.rej .del-* *.a  *.olb  *.o  *.obj  *.so
                     *.exe *.Z *.elc *.ln core .svn/ .git/ .bzr/~後略~

という事でした。 ちなみにバージョンは

$> rsync --version
rsync  version 3.0.6  protocol version 30

今日のポイント

manは重要です。

それ以上に重要なのは、何か実行する際はきちんと調べる癖を付ける事です。