# is there a 'git find'?

3 messages from 2009-08-05 to 2009-08-05. Participants: E R, Sverre Rabbelier, Junio C Hamano.
Thread: https://gitlist.dev/t/20379

## E R, 2009-08-05 04:14

Subject: is there a 'git find'?
Message-ID: <3a69fa7c0908042114v7097e87esbe18f49eef9267f5@mail.gmail.com>
URL: https://gitlist.dev/e/3a69fa7c0908042114v7097e87esbe18f49eef9267f5%40mail.gmail.com

```
Hi,

Within a specific commit I'd like to find all the files whose path
names match a regular expression.

Without checking out the commit, is there a way to do this? I'd like
to add this feature to gitweb.

Thanks,

ER

```

## Sverre Rabbelier, 2009-08-05 04:37

Subject: Re: is there a 'git find'?
Message-ID: <fabb9a1e0908042137x68beaeccv69a6974b41584ef4@mail.gmail.com>
URL: https://gitlist.dev/e/fabb9a1e0908042137x68beaeccv69a6974b41584ef4%40mail.gmail.com
In-Reply-To: <3a69fa7c0908042114v7097e87esbe18f49eef9267f5@mail.gmail.com>

```
Heya,

On Tue, Aug 4, 2009 at 21:14, E R<pc88mxer@gmail.com> wrote:
> Within a specific commit I'd like to find all the files whose path
> names match a regular expression.

Try 'git ls-files' [0].

[0] https://www.cs.drexel.edu/cgi-bin/manServer.pl/usr/share/man/man1/git-ls-files.1

-- 
Cheers,

Sverre Rabbelier

```

## Junio C Hamano, 2009-08-05 04:38

Subject: Re: is there a 'git find'?
Message-ID: <7veirqub81.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7veirqub81.fsf%40alter.siamese.dyndns.org
In-Reply-To: <3a69fa7c0908042114v7097e87esbe18f49eef9267f5@mail.gmail.com>

```
E R <pc88mxer@gmail.com> writes:

> Within a specific commit I'd like to find all the files whose path
> names match a regular expression.

    git ls-tree -r [--name-only | -t] "$commit" | grep -e "$pattern"

?

```
