tar and gzip - how do i point to a output directory
I want to run tar with the xvzf options on a .tgz file - but is there any way to do this from some directory A and have the unzipped files be placed in another directory B ? Im too lazy to move the file then run tar :D
|
How about consulting man page for tar?
Quote:
|
let's say you have the tar file
/home/redhat123/package.tar.gz and you want to extract it to /tmp/source/ You can use this command to extract the contents of the tar file to /tmp/source: tar -C /tmp/source -xzvf /home/redhat123/package.tar.gz watch out for the spaces and syntax. If you want a GUI, you can ark (in RHL it is present, i dunno about other distros): ark package.tar.gz And you can just drag and drop to a directory. |
cd to whatever directory you want the archive to be placed in. Then run your command pointing to the proper file. The archive will be untarred into the working (current) directory.
|
-C parameter for tar
If the archive doesn't support the -C you'll get... "File -C not present in the archive"! You won't be able to add an output local for the un-tar operation.
|
All times are GMT -5. The time now is 03:07 AM. |