This is the mail archive of the
mailing list for the Cygwin project.
Re: Simple find command does not work for * .html
- From: "Matthew Movafaghi" <mattmova at hotmail dot com>
- To: ericblake at comcast dot net, cygwin at cygwin dot com
- Date: Fri, 09 Sep 2005 00:15:36 +0000
- Subject: Re: Simple find command does not work for * .html
It was user error... of course. Thanks for the fix.
I was just trying to find all writiable files of certain types.
However, the command
'find /cygdrive/d -type f -perm -u+w -name \*.html' will sometimes not find
a writable file when windows thinks that it is. When viewed with ls -l, the
file doe not look writable, but when viewed with dir *.html /A-r /S from a
cmd prompt the file shows up.
Thanks for your help, Matt
From: firstname.lastname@example.org (Eric Blake)
To: Matthew Movafaghi <email@example.com>, firstname.lastname@example.org
Subject: Re: Simple find command does not work for * .html
Date: Wed, 07 Sep 2005 19:59:58 +0000
Received: from rwcrmhc12.comcast.net ([184.108.40.206]) by
MC8-F2.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 7 Sep 2005
Received: from 220.127.116.11 ([18.104.22.168]) by comcast.net
(rwcrmhc13) with SMTP id <2005090719595801500iug5qe>; Wed, 7 Sep
2005 19:59:58 +0000
Received: from [22.214.171.124] by 126.96.36.199;Wed, 07 Sep 2005 19:59:58
X-Mailer: AT&T Message Center Version 1 (Dec 17 2004)
X-OriginalArrivalTime: 07 Sep 2005 20:00:22.0808 (UTC)
> For some reason the following find command will not complete for *.html.
> It says: find: paths must precede expression....
User error. Remember that the shell does filename globbing before
find ever sees its input (unless you have done set -f in a POSIX shell).
If the current directory contains .html files, then you really are
causing a syntax error.
> `find d:\ -type f -perm -u+w -name *.properties`
Try 'echo find d:\ -type f -perm -u+w -name *.html' to see what you
were really doing, then try
'find d:\ -type f -perm -u+w -name \*.html'
to fix it. And while you are at it, since this is cygwin, try
'find /cygdrive/d -type f -perm -u+w -name \*.html'
to get rid of that pesky backslash (are you in a cmd.com shell,
explaining why you didn't quote it properly?) and behave more
volunteer cygwin findutils maintainer
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html