[CentOS] Bug in find command?
schreian at bc.edu
Wed Sep 27 17:38:11 UTC 2006
On Sep 27, 2006, at 1:02 PM, William L. Maltby wrote:
> I'm going to bugz this if no one tells me I made another brain-damaged
> error here. Also, if I can get one confirmation, it'll let me breath
> easier. I ran a version searching for ".cmd" and ".c" just trying to
> convince myself I'm not *that* brain-damaged.
> You'd think after all these years that regex compilation would be
> darn stable... Oh! Forgot it was GNU!
> Athlon CentOS-4.4 up to date:
> $ lsb_release -a
> LSB Version: :core-3.0-ia32:core-3.0-noarch:graphics-3.0-
> Distributor ID: CentOS
> Description: CentOS release 4.4 (Final)
> Release: 4.4
> Codename: Final
> $ uname -a
> Linux wlmlfs08.homegroannetworking 2.6.9-42.0.2.EL #1 Tue Aug 22
> 23:56:05 CDT 2006 i686 athlon i386 GNU/Linux
> $ cat MakeBugReportData
> cd /usr/src
> rpm -q --file /usr/bin/find
> find . | grep -i '\.cmd$' >/tmp/FilesGreppedDotCmd
> find . | grep -i '\.c$' >/tmp/FilesGreppedDotC
> find . -iname '*.cmd' >/tmp/FilesFoundDotCmd
> find . -iname '*.c' >/tmp/FilesFoundDotC
> wc -l /tmp/FilesGreppedDotCmd /tmp/FilesFoundDotCmd \
> /tmp/FilesGreppedDotC /tmp/FilesFoundDotC
> [wild-bill at wlmlfs08 tmp]$ sh ./MakeBugReportData
> 88 /tmp/FilesGreppedDotCmd
> 0 /tmp/FilesFoundDotCmd
> 3582 /tmp/FilesGreppedDotC
> 3582 /tmp/FilesFoundDotC
> 7252 total
> $ head -5 FilesGreppedDotCmd
find . -name '*.cmd'
or find . -iname '*.cmd'
does not appear to find file beginning with dot.
find . | grep cmd$
does. I thnk that's your difference.
More information about the CentOS