Gossamer Forum
Home : General : Perl Programming :

unzip to path

Quote Reply
unzip to path
I'm trying to unzip a file into a specific directory. It is currently being saved elsewhere- and not in the directory the zipped file was stored in.

Using
Quote:
tar -zxf /path/to/file/filename.tar PREFIX=/path/to/file/unzipped

but it is not working. Is there a correct command?

Thanks
Quote Reply
Re: [Alba] unzip to path In reply to
Is this in a perl script, or from command line?

If so, you *may* need; (NB, I've never used this myself, as most of the invokation stuff I do is in the directory I wanna decompress in =));

Code:
-C, --directory=DIR change to directory DIR

So something like;

Code:
tar -xof --directory=/path/to/decompress/in/ file.tar

As I said, this isn't something I use normally =D (appologies if its wrong, I'm still getting over the flue <G>).

Hope that helps

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] unzip to path In reply to
Thanks