How to interpret find's info page - Ask Ubuntu


this beginning of when type info find

find [-h] [-l] [-p] [-d debugoptions] [-olevel] [file...] [expression]   'find' searches directory tree rooted @ each file name file 

evaluating expression on each file finds in tree.

is accurate assume inside [] optional? or mandatory?

here examples of find command:

how can recursively find files in current , subfolders based on wildcard matching?  find . -name "foo*" 

how following fit here:

. -name "foo*" 

is info find text outdated several decades?
or incorrect?
or reading wrong?

edit:

after seeing first answer, must concure it's not expression. @ least judging man , info page.

expression    part of command line after list of starting points expression.       kind  of  query specification describing how match files , files    matched.  expression composed of sequence of things:     tests  tests return true or false value, on basis of property of file             considering.    -empty  test example true when current file           empty.     actions           actions have side effects (such printing   on   standard  output)  ,           return  either true or false, based on whether or not successful.            -print action example prints name of current file on standard output.     global options           global options affect operation of tests , actions specified on part  of            command  line.  global options return true.  -depth option example makes           find traverse file system in depth-first order.     positional options           positional optiona affect tests or actions follow them.  positional  options            return  true.   -regextype option example positional, specifying           regular expression dialect regulat expressions occurring later on command line.     operators           operators join other items within expression.  include  exam‐           ple  -o  (meaning logical or) , -a (meaning logical and).  operator miss‐           ing, -a assumed.     if whole expression contains no actions other -prune or -print, -print   performed    on files whole expression true.     -delete action acts option (since implies -depth). 

it doesn't mention -name @ , -name doesn't sound test, action, global option, positional option or operator. , man page doesn't explain things are?

this seems worst man / info page in history of software documentation.

no, it's not outdated - although version regular manual page (man find instead of info find) perhaps easier understand:

find [-h] [-l] [-p] [-d debugopts] [-olevel] [path...] [expression] 

in case of

find . -name "foo*" 
  1. . path (referred file in info page)
  2. -name "foo*" expression

and other options [-h] [-l] [-p] [-d debugopts] [-olevel] empty.

note gnu find unusual in making both path , expression optional; simple command

find 

will find files (and directories), recursively, starting current directory; portability, see people preferring specify current directory explicitly . in example.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User