Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the full gnuwin32 installation on my Win7 box. From the shell (cmd.exe), I can execute

c:\gnuwin32\bin\find.exe .

from a directory and get a list of all the files recursively. What I am trying to do is find all files with filenames ending in .rej. I would expect one of these to work:

c:\gnuwin32\bin\find.exe . -name "*.rej"
c:\gnuwin32\bin\find.exe . -name '*.rej'

but the first one only gives me one result (in the working directory), and the second gives me no results. In contrast,

ls -R | grep rej$

gives me many, many results ending in .rej. What am I missing?

share|improve this question
If you don't have any other criteria, you could just run from the command line: dir *.rej /s/b – jftuga Jul 19 '11 at 17:09
@jftuga Thanks -- I'll keep that in mind. In this case, I do need to do something with the files, though I can still use xargs in some incarnation, I'm sure. – Andrew Jul 19 '11 at 17:29

I never found a good answer regarding anything I can do to make gnuwin32 find work, but I found this answer with a workaround. Specifically, using the nearly-decade-old find.exe from UnxUtils seems to work.

share|improve this answer
Cygwin's find also appears to work just fine (at least on my Win7 x64 box). – Brian Knoblauch Jul 19 '11 at 18:48
I found useful… – Plutext Jul 15 '15 at 1:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .