|
From: | Ben Caradoc-Davies |
Subject: | Re: [Bug-tar] tar 1.29 bug: tar ignores --exclude option |
Date: | Wed, 25 May 2016 15:35:30 +1200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.2 |
On 26/05/16 09:05, Sergey Poznyakoff wrote:
Hi Ben, The --exclude option is position-sensitive, which means it applies to any arguments or options appearing after it in the command line. Therefore the correct tar invocation is: tar zcvvfXT - excludes includes Please see 3.4.4 "Position-Sensitive Options"[1], for details. Regards, Sergey [1] http://www.gnu.org/software/tar/manual/html_section/tar_22.html
Thanks very much Sergey. I can confirm that changing the order of the excludes and includes, as you indicated above, gives me the desired behaviour with tar 1.29:
$ tar zcvvfXT - excludes includes > /dev/null drwxrwx--- ben/ben 0 2016-05-21 14:39 base/ drwxrwx--- ben/ben 0 2016-05-21 14:40 base/dir-1/ -rw-rw---- ben/ben 0 2016-05-21 14:40 base/dir-1/file-1 Kind regards, -- Ben Caradoc-Davies <address@hidden> Director Transient Software Limited <http://transient.nz/> New Zealand
[Prev in Thread] | Current Thread | [Next in Thread] |