LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   unzipping files in rhel (https://www.linuxquestions.org/questions/linux-newbie-8/unzipping-files-in-rhel-4175459781/)

tapi 04-27-2013 08:19 AM

unzipping files in rhel
 
Hie guys i have created a zipped file in RHE using this command
tar -cvf /u01/850553.tar 850553/
location of the files is now in
/u01/850553.tar

Now i want to unzip it into a different file directory which is
/u01/share/docs

how do i go about it

spiky0011 04-27-2013 08:30 AM

Hi

You can cd into /u01/share/docs then run tar xvf /path/to/file

tapi 04-27-2013 08:35 AM

ok thank you i got it but why does it have to create directory /u01/8505583 when it extracts in only need 8505583 directory

spiky0011 04-27-2013 08:40 AM

Hi

You could use
tar -C /path/of/destinantion -xvf /path/of/tar

If you named the tar file 8505583 it would extract to that dir

John VV 04-27-2013 06:56 PM

it creates that directory because you used TAR
a tar ball is NOT a "zip" archive

it is uncompressed
a targz or tgz or tar.gz
is a "G" zipped tar archive

but a .tar is NOT a zip archive


All times are GMT -5. The time now is 12:40 PM.