LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-27-2013, 08:19 AM   #1
tapi
Member
 
Registered: Jan 2013
Posts: 55

Rep: Reputation: Disabled
Exclamation 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
 
Old 04-27-2013, 08:30 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debian
Posts: 2,193
Blog Entries: 1

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
Hi

You can cd into /u01/share/docs then run tar xvf /path/to/file
 
Old 04-27-2013, 08:35 AM   #3
tapi
Member
 
Registered: Jan 2013
Posts: 55

Original Poster
Rep: Reputation: Disabled
ok thank you i got it but why does it have to create directory /u01/8505583 when it extracts in only need 8505583 directory
 
Old 04-27-2013, 08:40 AM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debian
Posts: 2,193
Blog Entries: 1

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
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

Last edited by spiky0011; 04-27-2013 at 08:43 AM.
 
Old 04-27-2013, 06:56 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,089

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unzipping .exe files D_O_Y_L_E Linux - Software 3 03-23-2006 03:27 PM
unzipping .1.gz files budz Linux - Newbie 5 03-21-2006 10:15 PM
unzipping files??? linuxnoob1 Linux - Newbie 11 05-24-2005 01:30 AM
unzipping files using bz2 bruce64 Linux - Software 6 07-17-2003 02:51 PM
unzipping .zip files...how?? Robert0380 Linux - General 2 04-11-2002 04:54 AM


All times are GMT -5. The time now is 07:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration