The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
create a archive of old file jayaramanit UNIX for Dummies Questions & Answers 2 04-22-2008 02:05 AM
Extracting from a tar archive file nmalencia UNIX for Dummies Questions & Answers 1 03-22-2008 05:38 AM
Script to archive file indira UNIX for Dummies Questions & Answers 0 05-22-2007 07:15 AM
Human readable type vs MIME type detection using file spauldingsmails Shell Programming and Scripting 0 03-21-2007 08:43 PM
read file from tar.gz archive krylin High Level Programming 8 06-13-2003 08:28 AM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-03-2001
Registered User
 

Join Date: Sep 2001
Location: London
Posts: 1
Excluding a file type from an archive



I'm trying to archive a site excluding all PDF files in order to keep the size down. I have manged to do this in the past using the exclude argument in the tar command and something along the lines of *.pdf. Unfortunately, I failed at the time to note the syntax that I used and have been unsuccessfully trying to do it ever since.

I would be really grateful if someone could help me out with this - the simplest solution please as I am no command line jockey.

Thanks in advance

__________________
Stuart Curran
stuart@aardvarkmedia.co.uk
Forum Sponsor
  #2 (permalink)  
Old 09-03-2001
mib mib is offline
Registered User
 

Join Date: Jan 2001
Location: Calicut
Posts: 228
Red face

Create a file which contains filnames or dir names to be excluded.

ex: ls *.pdf > exclude.files

then use -X or --exclude-file option

tar -cvfX xxx.tar exclude.files /tar/this/dir



Google UNIX.COM
Closed Thread

Tags
tar exclude

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:03 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0