This is the mail archive of the
mailing list for the Cygwin project.
Re: find -exec oddity
Brian Dessent wrote:
Ken Dibble wrote:Brian,
As you can see, there are indeed some directories, but a whole bunch of
which shouldn't be there as well.
The big question now is why are some files considered directories?
I don't see the confusion here. You're feeding to "ls -l" the
parameters "./" , "./files to backup.txt" , and "./idiot.txt" which are
the results of find. "./" is a directory, so ls prints its contents not
its name, that's why you see listings for all the files in the current
directory, followed by listings for "files to backup.txt" and
"idiot.txt". When you add "-d" to ls, you get just three lines of
output, corresponding to the three things that find found. How is this
Like I said, I'm an idiot.
It did not occur to me that "./" was being passed to "ls" and that ls
was just doing
what it was told and listing the entire directory.
Thanks for helping me out.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html