On Mon, May 09, 2005 at 10:20:26AM +0100, Avis, Ed wrote:
> % find . -name foo/bar
> 
> Actual output: nothing
> Desired output: warning: don't be silly, Unix filenames can't contain
> a slash.

Good idea.  I implemented something slightly different:-

$ ./find . -name quux/umsp
./find: warning: Unix filenames usually don't contain slashes (though pathnames 
do).  That means that '-name quux/umsp' will probably evaluate to false all the 
time on this system.  You might find the '-wholename' test more useful, or 
perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could use 
'find ... -print0 | grep -FzZ quux/umsp'.

The message goes to stderr, but it's only a warning.

James.




_______________________________________________
Bug-findutils mailing list
Bug-findutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-findutils

Reply via email to