[NTLUG:Discuss] untar-ing without creating one level of directories
Fred James
fredjame at fredjame.cnc.net
Sat Feb 9 13:07:39 CST 2008
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
My bible on that would be the man pages, and I didn't see one, but I did
see an option to run some script immediately after the tar, which could
do the mv thing for you, I suppose (not tested by me)
Hope that helps
Regards
Fred James
More information about the Discuss
mailing list