How to check tar version in Solaris?


Login or Register to Reply

 
Thread Tools Search this Thread
# 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 05: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 06: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 Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
UNIX command to check if file name ends with .tar OR if the file is a tar file sanjaydubey2006 UNIX for Dummies Questions & Answers 10 02-19-2015 05:40 PM
How to download latest version of cmake using tar xzf? larry burns Fedora 3 11-10-2014 07:16 AM
How to check Oracle version on HP-UNIX? imtiaza HP-UX 3 12-04-2013 06:29 AM
How to read this Solaris version:-Solaris 8 HW 5/03 s28s_hw2wos_06a SPARC? manalisharmabe Solaris 3 08-29-2013 08:39 AM
How to check SVM version Solaris 9 and 10? ajhal04 Solaris 1 09-17-2011 02:39 PM
tar version samsungsamsung AIX 1 06-06-2011 10:12 AM
How to install new version of tar under solaris 9 Sigma UNIX for Dummies Questions & Answers 2 05-31-2010 06:07 AM
Command to check firmware version sunray Solaris 1 08-25-2009 08:34 AM
Check for the bit version of OS tcsprak Shell Programming and Scripting 4 06-09-2009 09:02 AM
tar: how to preserve atime? (also on extracted version, not just original) frankie06 UNIX for Advanced & Expert Users 10 12-15-2008 05:48 PM
How to check version of Solaris? am_yadav Solaris 5 02-06-2008 05:43 AM
Check version of Oracle am_yadav Solaris 1 02-04-2008 05:46 AM
HP tar version marlonus999 HP-UX 0 03-27-2007 05:07 AM
How can I tell what version of tar I have? FredSmith UNIX for Dummies Questions & Answers 3 10-07-2005 12:06 PM
to check version to library dilipluhar Programming 1 09-16-2001 11:32 AM