Re: [CentOS] Bug in find command?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, 2006-09-27 at 14:20 -0400, William L. Maltby wrote:

> <snip>
> find . -iname '*.cmd' >/tmp/FilesFoundDotCmd
> find . -iname '*.c' >/tmp/FilesFoundDotC
> 
> If *that* ain't a dot, I really need new glasses. 

You need new glasses:

find . -iname '.*.cmd' >/tmp/FilesFoundDotCmdf
find . -iname '.*.c' >/tmp/FilesFoundDotC

Of course, that would *only* get you the hidden files.

Your version would *not* find:

./.xyzzy.cmd


but it sounds like the problem is specific to the environment on your
machine.

>From the man page:

====
-name pattern

Base  of  file  name  (the  path  with  the leading directories
removed) matches shell  pattern  pattern.   The  metacharacters
('*',  '?',  and  '[]')  do not match a '.' at the start of the
base name. 
====

Note that this behavior changed in 4.2.2 so that '.' at the beginning of
a filename *are* matched.  But not in 4.2.20.


BTW, the K6-III's were great processors.  One of my favorites.  There
weren't many of them, but the 3 level cache really did make a
difference.


-Steve


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux