Posts Tagged ‘cygwin’

Which Cygwin package contains a file?

Thursday, July 1st, 2010

Cygwin

You never have all the tools you need.  For Cygwin, I used to hunt through the package list and guess which package had what I was looking for.  Well there is a better way.  And someone else has already written about it.

This link tells you how to determine which Cygwin package contains a file.

In case that site disappears, here’s how (pretend we are looking for the strings command):

  • There’s a web way:
        http://cygwin.com/cgi-bin2/package-grep.cgi?grep=strings.exe
  • and there’s a command line way (if you already have Cygwin installed):

        cygcheck -p strings.exe

…and the answer is… binutils!

How to squelch the Cygwin DOS path warning

Wednesday, March 17th, 2010

CygwinIn Cygwin version 1.7 they added a “feature” that would warn you about using DOS-style paths on the command line.

my-cygwin-pc> cd c:/<TAB>cygwin warning:
 MS-DOS style path detected: c:/
 Preferred POSIX equivalent is: /cygdrive/c
 CYGWIN environment variable option "nodosfilewarning" turns off this warning.
 Consult the user's guide for more details about POSIX paths:
 http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

At least this only happens the first time during the session, but I still wanted it gone.

So I tried to turn it off, but the instructions were a little ambiguous to me.  I tried setting a nodosfilewarning environment variable in my .cshrc.  I actually tried it several different ways:

setenv NODOSFILEWARNING 1
setenv nodosfilewarning 1
set nodosfilewarning=1

Turns out none of these are right.  You need to set a Windows environment variable named CYGWIN:

 

Mystery solved.