On Thu, Aug 14, 2003 at 01:42:37PM +0530, G.Vinubalaji wrote:
> 
> Is it  possible to extract all  files and directories  from the
> the tar.gz file  except for a list of  specified files? Checked
> out the man and  info pages of tar and could  not find info for
> that. It  does have  an option  to extract  a list  of specific
> files.

o AFAIK, there is no switch within tar to do such a thing.

o I have done the following thing in the past to achieve exactly
  what you are looking for. It is a multi-stage process.  It  is
  based on the -T (--from-file) switch:
  
  1. tar -tzvf filename.tar.gz | cut -b 52- > tar.lst
  2. vi tar.lst  [exclude dir entries and files not needed]
  3. tar -xzvf filename.tar.gz -T tar.lst
                                
HTH

Bish

--
:
####[ GNU/Linux One Stanza Tip (LOST) ]#######################

Sub : Single word spelling check using ispell        LOST #397

#!/bin/sh
if ! [ $1 ]; then echo "Usage: chk-spl [word]"; exit; fi
echo $1 > /tmp/chk-spl.$$; ispell /tmp/chk-spl.$$
rm -f /tmp/chk-spl.$$; exit 

####[usmbish (at) users.sourceforge.net]######################
:



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to