LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 11:57 AM   #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, 04:17 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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 03:11 AM.
 
Old 03-01-2009, 09: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, 02:12 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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, 02: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, 02: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, 03:12 PM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Yes if your PATH is missing /usr/sfw/bin. Not necessary on Solaris Express as gtar is in /usr/bin.
 
Old 03-02-2009, 03: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, 03:27 PM   #9
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

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



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

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

All times are GMT -5. The time now is 07:28 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
Open Source Consulting | Domain Registration