Personal tools
You are here: Home Knowledge Finding which cygwin package contains a particular file
Navigation
 

Finding which cygwin package contains a particular file

I often need to install a cygwin package to get a single file, but I can't find which package I need. This article explains how.

The other day I needed to install the cygwin "strings" command.  No problem, I'll just run the cygwin installer, grab the "strings" package, and I'll be all set.  But not so fast.  There is no "strings" package; "strings" is part of some other package.  But which one?  I finally stumbled upon the cygwin package-grep facility.  By using the URL:

http://cygwin.com/cgi-bin2/package-grep.cgi?grep=strings.exe

I was able to determine that strings.exe is in the "binutils" package.  A few minutes later, I was happily using the "strings" command.

I haven't found a user interface to package-grep, so I just build the URL by hand.

Update on 2009-11-4

Since I originally wrote this article, cygwin has developed the cygcheck utility. Among many other nice features, cygcheck provides a command line interface similiar to package-grep.cgi. For example:

cygcheck -p strings.exe

This will tell you that strings.exe is in binutils. If you know that it's an executable you're looking for, it's best to add the ".exe" extension. If you look for just "strings", you get a list of 144 packages that contain a file with the word "strings" in the filename.

In many ways, cygcheck is similar to the rpm and yum commands from Fedora or RedHat Linux, or apt-get from Ubuntu or Debian Linux.


If you enjoyed this article, we invite you to learn more about how you can become a high achieving computer professional.

 

Document Actions
Computer Pros

Computer
Professionals

Discover Your Full Potential

Find out what's different about high-achieving computer professionals and discover what may be holding you back.

Read more...

 
x Computer Pros - Interstitial Page with Flash

Technology Pros:
Worried About Your Job
Being Outsourced?
Raise Your Income and
Create Lasting Job Security

Join True Blade's Free Online Study Group.

Grab the opportunity to:
 • Avoid Being Outsourced
 • Earn More
 • Improve Your Job Security
 • Enjoy Every Working Day!

No Obligation - Cancel Anytime
Name
Email