LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-12-2002, 08:57 AM   #1
akohlsmith
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 114

Rep: Reputation: 15
Angry GNU tar ignoring -X?


Can anyone here help me figure out why gnu tar --exclude and -X are acting funny?

example: I am taring up /var/log. I don't want /var/log/archive/ or /var/log/radacct/. so I try this:

tar -czf mytar.tgz --exclude=/var/log/archive --exclude=/var/log/radacct /var/log

Sounds logical, but tar ignores the --exclude lines (tried just one too to see if that was the problem but no)

I've also tried putting those two directories in a file and

tar -czf mytar.tgz -X excludefile /var/log

but it has the same effect. :-(

Finally I tried this, although I didn't think it'd work at all since the man page says that includes override excludes:

includefile:
/var/log

excludefile:
/var/log/archive
/var/log/radacct

tar -czf mytar.tgz -T includefile -X excludefile

Can anyone help me?

Yes, I've already tried all combinations of removing leading /, adding trailing /, adding /* instead, etc. I don't think that's the problem.

This is GNU tar 1.13. The same thing exists with 1.12 on a much older machine.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
GNU tar problem :( John Micheal Solaris / OpenSolaris 4 05-25-2005 02:48 PM
mozilla-i686-pc-linux-gnu-1.4-koKR.tar.gz install error.. eye Linux - Software 1 09-01-2003 01:48 AM
NEED help fast with GNU/tar peter72 Linux - Software 1 05-19-2003 09:37 PM
tar instal of gnu parted suselinux Linux - Newbie 9 09-05-2001 11:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration