Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there an alternative find program with a more conventional CLI interface? find works and expects parameters in a painfully different way from most other utils.

Clarification: I'm looking for a program that has mostly the same functionality as find with a commandline interface that works and feels like POSIX (or at least GNU) commandline recommendations.

share|improve this question
I'm not entirely sure what you mean by 'more conventional', here... Perhaps you can clarify your question? – Shadur May 20 '11 at 11:05
GNU find does not respect POSIX (or even GNU) guidelines for command line. For example, ordering of parameters, multi-character options with a single dash etc. are different than in conforming programs. – Tamás Szelei May 20 '11 at 11:11
find is both consistent (see my answer) and intuitive. It's not like primaries are named weird. -exec means execute, -print means print it, -name means match a name. In practice, the former 3 and -type cover 95% of the usage cases. For all other cases, there's man find. – Mel May 20 '11 at 16:27
@tamas I edited an hour ago and told you there's no alternative except locate. And maybe ls -R come to think of it. Other alternatives are GUI programs that emulate find. Otherwise you have to specify what you want your find alternative to do. Walk dir trees? Filter file names? Tell you which files is newer then? – Mel May 20 '11 at 17:24
What do you want it to do? What should the syntax look like? – Mikel May 21 '11 at 0:54

This is a common misconception.

Find follows the options syntax. You're just confusing expression primaries with options:

 find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
 [cmd][-->        options          <--] [--> arg0..argN  <--]

The alternative is locate. But find implements it's own expression syntax because it provides a richer set of filter and action options. There's no alternative that can do the same, simply because it would be redundant.

share|improve this answer
Even if it's my fault, this does not answer my question. – Tamás Szelei May 20 '11 at 14:29
What is the difference between expression (only one allowed?), cmd (dito?), options and args? – user unknown May 20 '11 at 15:35
@user unknown -- the find command implements it's own expression syntax. The expression, when given, is the last argument on the command line. When absent, expression resolves to -print. – Mel May 20 '11 at 16:03
Ah - now I see, [cmd] isn't following [expression], but it's a description of the line before. – user unknown May 21 '11 at 3:04

It depends on the precise functionality of find that you are relying on. If it is (principally) the finding functionality, some shells support recursive globs. E.g., with zsh:

% find . -name \*c
inoshiro% ls *.c
% ls **/*.c 
a/bar.c  a/b/foo.c  baz.c

Zsh has a lot more find-like possibilities through glob qualifiers (look near the end of man zshexpn). For example:

ls -l **/*(.)  ≈  find -type f -ls
ls *(m-2u:$USER:)  ≈  find -mtime -2 -user $USER

Bash 4 also has **/ (you need to enable it with shopt -s globstar), but nothing like glob qualifiers.

share|improve this answer

I would take a look at locate. It will look through its database of files and quickly print out path names that match what you give.

kevin@box:~$ locate odg
kevin@box:~$ locate .odg

As you can see, it is a sub-text match: if you give it odg, then it will match dodge. But if you give it .odg, then it won't.

There is one downside, though: it needs a database. This database needs to be updated when things change. My Fedora 13 install has this put into a daily crontab, though.

share|improve this answer
I love locate – Andrew Lambert May 21 '11 at 10:00
Moreover, locate also accepts patterns (I learned this just recently). – Adam Byrtek May 21 '11 at 17:55

What are you trying to find? If you're typically searching for source code files, take a look at ack. It's basically a source code search tool, but ack's -f switch will find files that match a given filetype.

So if you want to find all the Perl files in a directory, for example, just:

ack -f --perl

If you don't like the filetypes that ack recognizes, you can add your own in your ~/.ackrc.

ack is not a general-purpose file finder like find, but if you're working with source code, it can be very handy.

share|improve this answer

One of the great things every programmer should learn is: If you can't find a tool, build your own!

find -name $<

I might write a better one, with -t to filter types, etc.

Edit: The above is a Bash script. It takes the command line argument and passes it to find as the -name option's value. Just a simple example. Since I put up this answer, I found this python script:


The interface looks nice, but I haven't tested its performance. Might be worth checking out.

share|improve this answer
True for building own tool statement. But at least explain how your little script is supposed to work. – jippie Dec 16 '12 at 9:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.