Bug 99430

Summary: tar --exclude and --exclude-from options broken
Product: [Retired] Red Hat Linux Reporter: Steve Hall <digitect>
Component: tarAssignee: Peter Vrabec <pvrabec>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-09 14:59:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steve Hall 2003-07-19 05:41:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:

Despite bugs 6665, 8380, 9201, 13115 being closed, the tar --exclude
and --exclude-from options completely fail to work on subdirectories
or files nested below the top level of the tar.

My particular instance is a tarball specified on a relative path, but
with exclusions tested for both absolute and relative path, specific
name or wildcard, and about 8 hours of testing all the allowable
option forms and quotation combinations. I was unable to get the
desired behavior even once.

Can't believe no one has needed this feature to date, but there is
much to be found on Google about the persistance of this bug since at
least year 2000.


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

How reproducible:
Always

Steps to Reproduce:
cd /home
tar -cvjf --exclude '*.mp3' /var/backup-home/user.tbz user

Comment 1 Peter Vrabec 2004-11-09 14:59:21 UTC
try this:
$ cd /home
$ tar -cvj --exclude *.mp3 -f /var/backup-home/user.tbz user