Bug 815099 - tar does not care about the "exclude=PATTERN" option
tar does not care about the "exclude=PATTERN" option
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: tar (Show other bugs)
15
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-22 09:59 EDT by John Mev
Modified: 2012-05-18 06:57 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-18 06:57:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Mev 2012-04-22 09:59:03 EDT
Description of problem:

tar does not care about the "exclude=PATTERN" option

Version-Release number of selected component (if applicable):

tar-1.26-2.fc15.i686

How reproducible:

execute tar cvf file.tar --exclude=home/user/movies/

Steps to Reproduce:
1.
2.
3.
  
Actual results:

includes the files under home/user/movies/   in the archive

Expected results:

would exclude them

Additional info:
Comment 1 Kamil Dudka 2012-04-22 11:48:27 EDT
Did you try to remove the trailing slash from your --exclude?
Comment 2 John Mev 2012-04-23 05:15:28 EDT
No.

I tried:

 --exclude=home/user/movies/
 --exclude=home/user/movies/*

I'll try again without the last slash.
Comment 3 John Mev 2012-04-23 12:23:29 EDT
Without the last slash, it works just fine.

Il would be a good idea to tell it in the man pages.
Comment 4 Ondrej Vasik 2012-04-23 12:34:45 EDT
Thanks for confirmation. Actually, GNU tar upstream doesn't maintain man pages - it only maintains info documentation - tar man pages are generated from --help output - and they are intended to be as compact as possible. In info documentation exclude section is quite detailed.
Comment 5 John Mev 2012-05-18 06:55:25 EDT
Finally tried again today and I confirm that it does not work with all options, with or without the last slash, with or without quotes.

Finally I was wrong.
I just tried --exclude="*.avi* as in the info pages and there is no change.
Comment 6 John Mev 2012-05-18 06:57:53 EDT
(In reply to comment #5)
> Finally tried again today and I confirm that it does not work with all options,
> with or without the last slash, with or without quotes.
> 
> Finally I was wrong.
> I just tried --exclude="*.avi* as in the info pages and there is no change.

Finally I found the way

I apologize

Note You need to log in before you can comment on or make changes to this bug.