Re: Using -prune option of find to ignore hidden directories
On 4 May 2017 at 01:13, <firstname.lastname@example.org> wrote:
> On Wednesday, May 03, 2017 10:57:09 AM Richard Owlett wrote:
>> The man page for find confuses me.
>> Looking for explanatory material I found and tried to follow examples in
>> http://mywiki.wooledge.org/UsingFind#A-prune .
Relevant examples are on that very same page:
For additional relevant examples, click on the "globs" link in the
4th sentence there:
"Note that find uses *globs* to express filename-matching patterns."
And for additional relevant examples, click on the "quote" link in the
5th sentence there:
"Note also that we had to *quote* the glob in order to prevent the shell
from expanding it."
Thank you to Greg and other contributors for hosting and writing that
The thing that initially confused me (and probably everyone else on the
planet) most about 'find' is that its command line syntax looks superficially
similar to other commands, but it is very different.
First aspect to understand is:
find [option] [path...] [expression]
Note that the only available options are:
[-H] [-L] [-P] [-D debugopts] [-Olevel]
So all the other things that superfically look like options because they
have a leading '-' character, are actually not options, rather they are
components of expressions. And so (unlike most options) their
And what is additionally and excruciatingly confusing to everybody
is that the 'find' documentation names some of these expression
components as "options". It would be less confusing if they were
more clearly named "expression-options" or something like that.
You might also get helpful information by running:
to read the full GNU documenation.
If you don't like the user interface of the 'info' program, you can
dump all its output into a text file by running:
info -f find --subnodes >output_will_be_saved_in_this_text_file