Bug 815099

Summary: tar does not care about the "exclude=PATTERN" option
Product: [Fedora] Fedora Reporter: John Mev <zikamev>
Component: tarAssignee: Ondrej Vasik <ovasik>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: kdudka, ovasik, praiskup, zikamev
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-18 10:57:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description John Mev 2012-04-22 13:59:03 UTC
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 15:48:27 UTC
Did you try to remove the trailing slash from your --exclude?

Comment 2 John Mev 2012-04-23 09:15:28 UTC
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 16:23:29 UTC
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 16:34:45 UTC
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 10:55:25 UTC
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 10:57:53 UTC
(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