[NTLUG:Discuss] untar-ing without creating one level of directories

Wayne Walker wwalker at bybent.com
Mon Feb 11 19:14:21 CST 2008


"normal usage":
	tar xfz pmwiki-latest.tgz

"strip a level"
	tar xfz --strip 1 pmwiki-latest.tgz

"strip a level and dump other than the current directory"
	tar xfz --strip 1 -C /var/www/html/my-pmwiki pmwiki-latest.tgz

On Sat, Feb 09, 2008 at 12:26:27PM -0600, Richard wrote:
> What is the term used to untar something without creating that first 
> directory structure level?
> 
> For instance, when I'm untar-ing  pmwiki-latest.tgz,  I want the files 
> in the first directory structure stored in that tgz(pmwiki-Ver.si.on) to 
> go directly into the current directory and not into a subdirectory which 
> causes me to have to do a 'mv pmwiki-Ver.si.on/* .'
> 
> While I sometimes want that functionality, it'd be nice to be able to 
> turn it off on occasion.
> 
> For that matter, is there a way to redirect tar to extract files into an 
> alternate path?
> 
> -- 
> Richard
> 
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss

-- 

Wayne Walker

wwalker at bybent.com                    Do you use Linux?!
http://www.bybent.com                 Get Counted!  http://counter.li.org/
Perl - http://www.perl.org/           Perl User Groups - http://www.pm.org/
Jabber:  wwalker at jabber.bybent.com   AIM:     lwwalkerbybent
IRC:     wwalker on freenode.net



More information about the Discuss mailing list