LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 01-24-2013, 05:49 AM   #1
digitalformula
LQ Newbie
 
Registered: Feb 2011
Posts: 12

Rep: Reputation: 0
Question Can tar accept an "include file" (as opposed to an include pattern)?


Hi all,

I know tar has the --include option and, on some systems, the --from-file= option. I'm using OS X, which doesn't have the --from-file option. I'm also aware of the -X option.

E.g. when using -X, I have /tmp/exclude.txt that contains the following:

~/Documents
~/Downloads

(etc). Running tar on ~ with -X works perfectly as ~/Documents and ~/Downloads are excluded.

I'm looking for the inclusion equivalent of -X but can't seem to find anything in the man pages or GNU site. This is because I'd like to have a list of paths (not filenames) that are included in a tar command.

Does tar have that or do I need to create the include, manually cat/sed the contents and pass each path to the tar command?

Thanks!

Last edited by digitalformula; 01-24-2013 at 05:52 AM. Reason: Added additional info
 
Old 01-24-2013, 10:18 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,565

Rep: Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696
Man tar never says much.
Grok the source, or use the info page. The tar info page sucks like few other things but it does have depth. You may have to spend some time searching.
Tar - Tar options - File options - less common options - really unusual options - never-heard-of options - macos intel - macos - qwerty etc.
 
  


Reply

Tags
include, tar


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
How to use "tar" to include./ on the path of the files jcbermu Linux - General 1 06-20-2007 08:20 AM
Bristol 10.4 configure not finding JACK,ALSA, or "X11 include file" on Ubuntu studio scwerllguy Linux - Software 7 06-03-2007 05:43 PM
Clarifiacation on header file "/usr/include/a.out.h" swathisat Linux - Software 0 09-05-2003 01:12 AM
sendmail: "permission denied" when using include:/file sohmc Linux - Software 1 05-22-2003 07:40 AM
What is correct code for "Include File Function" on .asp pages gregoryfrancis Linux - General 1 02-11-2003 11:49 PM


All times are GMT -5. The time now is 04:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration