LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-13-2009, 09:31 AM   #1
kais1
Member
 
Registered: Dec 2008
Posts: 61

Rep: Reputation: 17
tar exclude directories


Dear all,

Am using the below command to exclude a directory from tar, but still I notice that the excluded directory is getting archived.

[code]
tar -cvf TABS_6.11.2.2_3-11-2008_prod_oct13.tar /ccbs/appl/orasoa/1013/j2ee/OC4J_CRM/applications/rmsp/TABS_6.11.2.2_3-11-2008 --exclude "/ccbs/appl/orasoa/1013/j2ee/OC4J_CRM/applications/rmsp/TABS_6.11.2.2_3-11-2008/crm/pdf"
[code]

Any idea ?


Kai
 
Old 10-13-2009, 10:01 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

I'm always using the -X option and a file containing the directories I want to exclude
Code:
tar cjvfX backup.tar.bz2 exclude-files.txt /home/username
Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CVS Exclude : Exclude sub directories from check out On Linux from command line shajay12 Linux - Newbie 1 08-03-2009 01:36 AM
How to exclude directories in tar? depam Linux - General 3 05-07-2007 09:23 PM
Tar won't exclude directories. yougene Slackware 9 12-01-2005 10:32 AM
tar --exclude --exclude-from cefn Linux - Software 4 10-11-2005 08:31 PM
Exclude directories when backing up with 'tar'? wolfpeach Linux - Newbie 2 06-28-2004 11:54 AM


All times are GMT -5. The time now is 07:01 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration