Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to check vim exist in my server

Status
Not open for further replies.

hok1man

Technical User
Feb 16, 2008
102
Hi guys,

as title above, I would like to check it.
What I did was

rpm -qa | grep -i vim

but uNIX doesn't recognize rpm..
I was just wondering what the command is ...

platform : Solaris 8

thanks guys
 
RPM is a linux command not solaris.
Try pkginfo -l | grep SMCvim.
 
Maby you can use which to do this?
Code:
man which

Code:
which -a vim
Should show the path to all executable vim-files on the system.

HTH
:)


 
Hello,

I partly disagree with geirendre.
which command will only show those vim files that are in the PATH.
man which said:
--all, -a
Print all matching executables in PATH, not just the
first.
If you want to locate all the executables with name vim, you will have to use find command.
 
find / -name vim -print 2>/dev/null

Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Yes, hoinz and Mike my be right, but if Vim is installed
on the system it should be in the $PATH,
and find would find any file named "vim" on the system,
including boguss files too.
So if he needs to be 100% sure, he might need to
check what he finds with something like md5-sum, right?
 
OR...you could just use pkginfo -l | grep SMCvim.

DESCRIPTION
pkginfo displays information about software packages that are installed on the system.

There is no -a switch for which in solaris 8, as per original poster.
 
Hello geirendre,

I agree that the find method may produce false positives that will need further checking.
My point was that the which method may miss files, and produce false negatives. It is quite common that the $PATH variable differs for various users, imho.

And about checking: md5-sum is one of the more sophisticated ways; I think I would be satisfied with an easier way: Try to edit a text file using the program in question.
[wink]

But, as AnotherAlan pointed out, if you know about the specific install routines of your flavour of Unix/Linux, this should be sufficient.

regards
 
Just for completeness the AIX version of
Code:
rpm -qa
is
Code:
lslpp -al

On the internet no one knows you're a dog

Columb Healy
 
I am using SUN solaris 8
pkginfo is working..
others(rpm,lslpp) dont work for me,

probably AIX and SUN SOLARIS is different

but it doesnt show vim, actually we got vim...
I was wondering
so they install it not via rpm? via package?
 
so they install it not via rpm? via package?

Maybe the just copied it on to the system (SHOCK! HORROR!) :)

Another way to find out whether it's part of a Sun package is to grep vim /var/sadm/install/contents which contains all files installed and their corresponding package names, if they were part of a package.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top