LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 03-01-2009, 12:57 PM   #1
okonita
LQ Newbie
 
Registered: Mar 2006
Posts: 8

Rep: Reputation: 0
Unable to gunzip a tar.gz file on Solaris 10 5/07 as guest OS on VMware.


Hi all,

I am a little mystified here. I have Solaris 10 (5/07) on VMware as a guest OS. I am having trouble extracting from a VMware Tools tar.gz file. The command that I am using is gunzip -c /cdrom/vmwaretools/vmware-solaris-tools.tar.gz | xf-

and I am getting this error:

tar: tarfile must be specified with 'f' function modified

Is the untar syntax different in Solrais that it is in Linux? Because this same command works just fine on a Linux OS.

What is the correct syntax for Solaris?

Thanks very much for any help I can get.

Okonita
 
Old 03-01-2009, 05:17 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,633

Rep: Reputation: 1808Reputation: 1808Reputation: 1808Reputation: 1808Reputation: 1808Reputation: 1808Reputation: 1808Reputation: 1808Reputation: 1808Reputation: 1808Reputation: 1808
Quote:
gunzip -c /cdrom/vmwaretools/vmware-solaris-tools.tar.gz | xf-
I guess it's a typo that you missed the tar command after the pipe. Also the dash "use stdout" must be separate from the tar options. Thus, you should try:
Code:
gunzip -c /cdrom/vmwaretools/vmware-solaris-tools.tar.gz |tar xf -

Last edited by bathory; 03-02-2009 at 04:11 AM.
 
Old 03-01-2009, 10:15 PM   #3
Infasoft
Member
 
Registered: Aug 2008
Location: Salem, Oregon
Distribution: Windows 7 home premium X86_64 | Linux
Posts: 63

Rep: Reputation: 15
That hapened to me a lot. just try:
Code:
gzip -dc <path_to_file> | tar xvf -
 
Old 03-02-2009, 03:12 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Tribblix, Ubuntu/WSL
Posts: 9,771

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
or simply (with /usr/sfw/bin/ in your PATH if required):
Code:
gtar xzvf /cdrom/vmwaretools/vmware-solaris-tools.tar.gz
 
Old 03-02-2009, 03:32 PM   #5
okonita
LQ Newbie
 
Registered: Mar 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Infasoft View Post
That hapened to me a lot. just try:
Code:
gzip -dc <path_to_file> | tar xvf -
Thanks guys! I'll try that shortly and hope it works for me...this is driving me nuts...
 
Old 03-02-2009, 03:35 PM   #6
okonita
LQ Newbie
 
Registered: Mar 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jlliagre View Post
or simply (with /usr/sfw/bin/ in your PATH if required):
Code:
gtar xzvf /cdrom/vmwaretools/vmware-solaris-tools.tar.gz
How would you code this?
/usr/sfw/bin/gtar xzvf?
 
Old 03-02-2009, 04:12 PM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Tribblix, Ubuntu/WSL
Posts: 9,771

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
Yes if your PATH is missing /usr/sfw/bin. Not necessary on Solaris Express as gtar is in /usr/bin.
 
Old 03-02-2009, 04:14 PM   #8
okonita
LQ Newbie
 
Registered: Mar 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Infasoft View Post
That hapened to me a lot. just try:
Code:
gzip -dc <path_to_file> | tar xvf -
Infasoft, This is to report that gzip -dc <path_to_file> | tar xvf -
is the one that appears to be working - decompressing as I write...

Thanks guys...you are a savior!
 
Old 03-02-2009, 04:27 PM   #9
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Tribblix, Ubuntu/WSL
Posts: 9,771

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
If for some reason, you do not want to use gtar and if you have trouble remembering gzip / gunzip options, you can still run:
Code:
gunzip < path_to_file | tar xvf -
 
  


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
Unable to use tar -xzvf with a abc.tar.gz file kakultech Linux - Software 6 11-08-2010 12:03 PM
Unable to see usb mounted drive in VMware RHEL guest warrickj Linux - Hardware 2 10-08-2008 10:34 PM
Unable to install guest OS on VMWare ZhiYi Linux - Software 1 06-25-2005 04:04 AM
command tar: - ? gunzip or no ? eeried Linux - Newbie 4 04-06-2005 01:59 PM
How to pass protect Gunzip/Tar? LiD Linux - General 3 02-16-2005 05:25 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 09:13 PM.

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