tar --exclude-vcs-ignores -c /home/kdibble > /tmp/kdibble.tar
According to gnu.org tar 1.34 section 6.4
Before archiving a directory, see if it contains any of the
following files: ‘cvsignore’, ‘.gitignore’, ‘.bzrignore’, or
‘.hgignore’. If so, read ignore patterns from these files.
The patterns are treated much as the corresponding VCS would treat
Contains shell-style globbing patterns. Applies to the directory
where ‘.gitfile’ is located and all its subdirectories.
Any line beginning with a ‘#’ is a comment. Backslash escapes the
here is /home/kdibble/.gitignore
#.gitignore for home directory
$ ls /tmp/backup_test | grep binary_data
$ ls /tmp/backup_test | grep "o.d"
$ tar tf /tmp/kdibble.tar | grep binary_data
$ tar tf /tmp/kdibble.tar | grep "o.d"
I understand that the documentation says "much as the corresponding
VCS would treat them"
IF they are not going to work the same, don't make it sound as
though they do work
the same or name the command line switch like they do. Especially on
for backing up data, where there is an expectation of being able to
you intended to back up.
For reference the '**' glob was apparently introduced with Bash 4 in
so it isn't something new.
Then again, maybe I am missing something....
Hoping to be enlightened,
This message was posted to the following mailing lists: