If I have the following directory:$ ls -a foo.  ..  a  #a#  a~  b  b.bkp  c  .git  .hg  .svnand call:$ tar zcf foo-no-bkp.tar.gz --exclude-backups foo/The resulting archive still has backup files (even those considered backup files according to the documentation).$ tar ztf foo-no-bkp.tar.gz foo/foo/a~foo/.svn/foo/#a#foo/.hg/foo/afoo/.git/foo/b.bkpfoo/cfoo/bI am using GNU tar 1.26 on Ubuntu 12.04. What can be wrong? Should it be considered a bug?
tar --exclude-backups does not exclude files with tilde at end
backup;tar;gnu
I believe this is a bug which has been fixed, in July 2011, but probably hasn't made it to your version of tar yet.v.1.26 is the current version, and was released 19 months ago (i.e. March 2011), but there will be some delay between the upstream patch and Ubuntu pushing out the fix. It looks like upstream haven't released this as a bug fix yet, since the latest 1.26 download is still dated March 2011.