On Thu, Aug 19, 2021 at 10:28:16PM +0900, matsuand wrote: > <STATUS> > stat: DP > ppkg: GNU findutils 4.8.0 > page: find.1 > date: 2021/01/09 > mail: michio_matsu****@yahoo***** > name: Michio MATSUYAMA > </STATUS> コメントします(part 09)。 > [原文] > .IP > The .B find utility shall detect infinite loops; that is, > entering a previously visited directory that is an ancestor > of the last file encountered. When it detects an infinite > loop, find shall write a diagnostic message to standard > error and shall either recover its position in the > hierarchy or terminate. > [訳文] > .IP > find ユーティリティは、 > 無限ループを検出できなければなりません。 無限ループとは、 > 処理対象となったファイルの上位ディレクトリが、 > 以前に処理していたものであって、 > そのディレクトリに入った処理を進めてしまうことです。 > 無限ループを検出した場合、 find は、 > 診断メッセージを標準エラー出力に書き出すものとします。 > そして、 ディレクトリ階層上での検索位置を復旧するか、 > あるいは終了するものとします。 > ---------------------------------------- そのディレクトリに入った処理を進めてしまうことです。 -> そのディレクトリに入ることです。 #処理を進めてしまうとは書いてないので。 > [原文] > .P > GNU .B find complies with these requirements. The link > count of directories which contain entries which are hard > links to an ancestor will often be lower than they > otherwise should be. This can mean that GNU find will > sometimes optimise away the visiting of a subdirectory > which is actually a link to an ancestor. Since .B find > does not actually enter such a subdirectory, it is allowed > to avoid emitting a diagnostic message. Although this > behaviour may be somewhat confusing, it is unlikely that > anybody actually depends on this behaviour. If the leaf > optimisation has been turned off with .BR -noleaf , the > directory entry will always be examined and the diagnostic > message will be issued where it is appropriate. Symbolic > links cannot be used to create filesystem cycles as such, > but if the .B -L option or the .B -follow option is in use, > a diagnostic message is issued when .B find encounters a > loop of symbolic links. As with loops containing hard > links, the leaf optimisation will often mean that .B find > knows that it doesn't need to call .I stat() or .I chdir() > on the symbolic link, so this diagnostic is frequently not > necessary. > [訳文] > .P > GNU find は、 この要件を満たしています。 > 上位ディレクトリへのハードリンクを含んだディレクトリと、 > そういったものを含まないディレクトリを比較してみると、 > ディレクトリのリンク数は、 > 前者の方が少なくなることがよくあります。 > このことがあるため、 > 上位ディレクトリへのリンクであるサブディレクトリに対して、 > GNU find は、 最適化によって、 > そのディレクトリを調べないケースが発生します。 find > は実際に、 そういったサブディレクトリに入っていかないため、 > 診断メッセージの出力を抑えることができます。 > わかりにくい処理かもしれませんが、 > 実際にこの動作に期待する人は、 まずいません。 -noleaf > オプションの指定によって、 葉 (leaf) > に関する最適化処理が無効になっていた場合、 > ディレクトリの各エントリは、 必ず調べられます。 > したがって診断メッセージは、 必要な場面で表示されます。 > シンボリックリンクを使っていれば、 > ファイルシステム上にこのようなリンクを作り出すことはできませ > ん。 ただし -L オプションや -follow > オプションを指定しているときには、 > シンボリックリンクのループが見つかると、 > 診断メッセージが表示されます。 > ハードリンクを含むループの場合と同様に、 > 葉に関する最適化によって、 find > がシンボリックリンクに対して、 stat() や chdir() > を用いる必要がないと判断することがあるため、 診断情報は、 > かなりの頻度で必要なくなります。 > ---------------------------------------- GNU find は、 最適化によって、 そのディレクトリを調べないケースが発生します。 -> GNU find は、 上位ディレクトリへのリンクになっている サブディレクトリへの移動を最適化するケースが発生します。 > [原文] > .IP LC_CTYPE > This variable affects the treatment of character classes > used in regular expressions and also with the .B -name > test, if the system's .BR fnmatch (3) library function > supports this. This variable also affects the > interpretation of any character classes in the regular > expressions used to interpret the response to the prompt > issued by .BR -ok . The `LC_CTYPE' environment variable > will also affect which characters are considered to be > unprintable when filenames are printed; see the section > UNUSUAL FILENAMES. > [訳文] > .IP LC_CTYPE > この環境変数は、 > 正規表現で使用される文字クラスの扱い方に影響を及ぼします。 > さらに、 システムの fnmatch(3) ライブラリ関数が -name > に対応している場合は、 それを用いる際に影響します。 > アクション -ok > のプロンプトにおけるユーザー入力値の解釈には、 > 正規表現が用いられますが、 この変数は、 > その正規表現内の文字クラスの判断に影響します。 環境変数 > LC_CTYPE は、 ファイル名の表示時に、 > 表示できない文字を判断する処理に影響します。 > 「普通ではないファイル名」のセクションを参照してください。 > ---------------------------------------- 正規表現で使用される文字クラスの扱い方に影響を及ぼします。 さらに、 システムの fnmatch(3) ライブラリ関数が -name に対応している場合は、 それを用いる際に影響します。 -> システムの fnmatch(3) ライブラリ関数がこの環境変数をサポート している場合、正規表現で使用される文字クラスと、 .B -name テストで使われる文字クラスの扱い方に影響を及ぼします。 > [原文] > .IP PATH > Affects the directories which are searched to find the > executables invoked by .BR -exec , .BR -execdir , .B -ok > and .BR -okdir . > [訳文] > .IP PATH > -exec, -execdir, -ok, -okdir > から呼び出される実行ファイルが、 > どのディレクトリにあるかを検索するために必要です。 > ---------------------------------------- どのディレクトリにあるかを検索するために必要です。 -> どのディレクトリにあるかを検索する時に影響します。 次回はここから > [原文] > .SH "EXAMPLES" > [訳文] > .SH 例