Как интерпретировать информационную страницу находки

Это начинается того, что я получаю, когда я ввожу info find

find [-H] [-L] [-P] [-D DEBUGOPTIONS] [-OLEVEL] [FILE...] [EXPRESSION]

 'find' searches the directory tree rooted at each file name FILE by

при оценке ВЫРАЖЕНИЯ на каждом файле это находит в дереве.

Действительно ли это точно, я предполагаю, что что-то внутри [] является дополнительным? Или обязательный?

Вот некоторые примеры команды находки:

How can I recursively find all files in current and subfolders based on wildcard matching?

find . -name "foo*"

Как делает следующее соответствие здесь:

.
-name
"foo*"

Эта информация, находят текст, что я становлюсь устаревшим на несколько десятилетий?
Или просто неправильный?
Или я читаю его неправильно?

Править:

После наблюдения первого ответа я должен concure это не быть выражением. По крайней мере, судя человеком и информационной страницей.

EXPRESSION
   The part of the command line after the list of starting points is the expression.  This  is  a
   kind  of  query specification describing how we match files and what we do with the files that
   were matched.  An expression is composed of a sequence of things:

   Tests  Tests return a true or false value, usually on the basis of some property of a file  we
          are  considering.   The  -empty  test for example is true only when the current file is
          empty.

   Actions
          Actions have side effects (such as printing  something  on  the  standard  output)  and
          return  either true or false, usually based on whether or not they are successful.  The
          -print action for example prints the name of the current file on the standard output.

   Global options
          Global options affect the operation of tests and actions specified on any part  of  the
          command  line.  Global options always return true.  The -depth option for example makes
          find traverse the file system in a depth-first order.

   Positional options
          Positional optiona affect only tests or actions which follow them.  Positional  options
          always  return  true.   The -regextype option for example is positional, specifying the
          regular expression dialect for regulat expressions occurring later on the command line.

   Operators
          Operators join together the other items within the expression.  They include for  exam‐
          ple  -o  (meaning logical OR) and -a (meaning logical AND).  Where an operator is miss‐
          ing, -a is assumed.

   If the whole expression contains no actions other than -prune or -print, -print  is  performed
   on all files for which the whole expression is true.

   The -delete action also acts like an option (since it implies -depth).

Это не упоминает -name вообще и -name не походит Test, Action, Global Option, Positional Option or Operator. И страница справочника даже не объясняет, каковы те вещи?

Это походит на худшего человека / информационная страница в истории документации программного обеспечения.

3
задан 4 November 2016 в 17:11

1 ответ

Нет, это не устарело - хотя версия из обычной страницы руководства (man find вместо info find) возможно, легче понять:

find [-H] [-L] [-P] [-D debugopts] [-Olevel] [path...] [expression]

В случае

find . -name "foo*"
  1. . путь (называемый ФАЙЛОМ на информационной странице)
  2. -name "foo*" выражение

и другие опции [-H] [-L] [-P] [-D debugopts] [-Olevel] все пусты.

Обратите внимание, что находка GNU несколько необычна в создании обоих path и expression дополнительный; так простая команда

find

найдет все файлы (и каталоги), рекурсивно, начинающий с текущего каталога; для мобильности Вы будете часто видеть, что люди предпочитают указывать текущий каталог явно как . как в Вашем примере.

8
ответ дан 1 December 2019 в 13:16

Другие вопросы по тегам:

Похожие вопросы: