[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] weird "find" behavior
- Subject: [ale] weird "find" behavior
- From: greg.freemyer at gmail.com (Greg Freemyer)
- Date: Sun Dec 2 00:24:39 2007
- In-reply-to: <1196552522.11773.2.camel@localhost>
- References: <1196552522.11773.2.camel@localhost>
On Dec 1, 2007 6:42 PM, Jim Popovitch <yahoo at jimpop.com> wrote:
> I'm seeing some find weirdness. On both Ubuntu Etch and RH4ES, if I do
> the following I can locate files:
>
> find /usr/include/ -type f -name *.c
>
> But if I do this, I find nothing:
>
> find /usr/include/ -type f -name *.h
>
> However if I do this, I find files:
>
> find /usr/include/ -type f -name "*.h"
>
> WTF?
>
> -Jim P.
If the current directory has no *.c files, then your first command
works by chance.
If it has some *.h files, then it fails due to standard shell
expression expansion.
The "*.h" syntax will always work.
Greg
--
Greg Freemyer
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
First 99 Days Litigation White Paper -
http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf
The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com