How to check tar version in Solaris?

find tar utility version solaris

Login to Reply

Thread Tools Search this Thread
# 1  
Old 12-07-2017
How to check tar version in Solaris?

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

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.

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



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

With gtar:
$ which gtar

$ gtar --version
tar (GNU tar) 1.27.1

On a systerm like:
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 to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

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

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.