How to check tar version in Solaris?


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers How to check tar version in Solaris?
# 1  
Old 12-07-2017
How to check tar version in Solaris?

Code:
for pkg in `pkginfo | grep tar | grep application | awk '{print $2}'`; do pkginfo -l $pkg | grep VERSION; done


Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 12-07-2017 at 06:11 AM.. Reason: Added CODE tags.
# 2  
Old 12-07-2017
Hi,

I tend to be a little less discerning when searching through a pkginfo output as I've been caught out by things in the past.

What I tend to use is a search as follows, a bit more work to check but it does check if the package might impact things.

Code:
pkginfo -l | nawk 'BEGIN { FS = "\n"; RS = "" }$0 ~ search { print $0 }' search=tar - | egrep 'PKGINST|VERSION'

Regards

Gull04

Last edited by gull04; 12-07-2017 at 07:11 AM.. Reason: Spelling Mistake
# 3  
Old 12-07-2017
Hi.

With gtar:
Code:
$ which gtar
/usr/bin/gtar

$ gtar --version
tar (GNU tar) 1.27.1

On a systerm like:
Code:
OS, ker|rel, machine: SunOS, 5.11, i86pc
Distribution        : Solaris 11.3 X86
bash GNU bash 4.1.17
gtar tar (GNU tar) 1.27.1

Best wishes ... cheers, drl
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX command to check if file name ends with .tar OR if the file is a tar file

Hello Team, Would you please help me with a UNIX command that would check if file is a tar file. if we dont have that , can you help me with UNIX command that would check if file ends with .tar Thanks in advance. (10 Replies)
Discussion started by: sanjaydubey2006
10 Replies

2. Fedora

How to download latest version of cmake using tar xzf?

...... (3 Replies)
Discussion started by: larry burns
3 Replies

3. Solaris

How to check SVM version Solaris 9 and 10?

How to check Solaris Volume Manager Version in 9 & 10? Which are the packages that are installed in the SVM? (1 Reply)
Discussion started by: ajhal04
1 Replies

4. AIX

tar version

Hi How to find the version of tar installed in my aix box ? (1 Reply)
Discussion started by: samsungsamsung
1 Replies

5. UNIX for Dummies Questions & Answers

How to install new version of tar under solaris 9

Hello, I'm trying to install new version of tar under solaris "tar-1.23-sol9-sparc-local.gz" in Solaris, I downloaded this version from sunfreeware.com I unzip it and I found only binaire file no Readme... some one vcan help ?? Thanks (2 Replies)
Discussion started by: Sigma
2 Replies

6. UNIX for Advanced & Expert Users

tar: how to preserve atime? (also on extracted version, not just original)

How do I make tar set the correct atime on the extracted version? The option --atime-preserve works just on the original, not on the extracted file. The extracted files always have current time as atime, which is bad. (10 Replies)
Discussion started by: frankie06
10 Replies

7. Solaris

How to check version of Solaris?

Hi All, Looks a foolish question, but please can someone tell me the command to check version of Solaris OS? Thanks, Am (5 Replies)
Discussion started by: am_yadav
5 Replies

8. Solaris

Check version of Oracle

Hi All, Please advice me how i can check the Oracle version on my UNIX Solaris machine without logging in to oracle? Thanks, Am (1 Reply)
Discussion started by: am_yadav
1 Replies

9. HP-UX

HP tar version

Guys, I need to know what version of tar i am using in our HP B11.11 box (model = 9000/800/rp8420 ). We have created a tar file and i wanted to know if the tar version i used supported 8GB-sized files (Check sanity of the archived file). As you know old version of tar is limited to files... (0 Replies)
Discussion started by: marlonus999
0 Replies

10. UNIX for Dummies Questions & Answers

How can I tell what version of tar I have?

I know this should be easy, but Google is not turning up any results: How can I find out what version of software (like tar and gzip) I have installed on my Sun box? Thanks! (3 Replies)
Discussion started by: FredSmith
3 Replies
Login or Register to Ask a Question