Finding which cygwin package contains a particular file
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:
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.
If you enjoyed this article, we invite you to learn more about how you can become a high achieving computer professional.