[JM:00089] Re: [POST:RO] GNU_findutils find.1

Back to archive index

Akihiro MOTOKI amoto****@gmail*****
2010年 12月 28日 (火) 01:24:26 JST


元木です。

お疲れ様です。
リリース後ですが、日本語だけを表示して読んでみました。
先頭から EXPRESSIONS の節の直前までです (1/3)。

>>>>> Date: Mon, 20 Dec 2010 21:32:48 +0900 (JST)
>>>>> From: 長南洋一 <cyoic****@maple*****>
>>>>> Subject: [JM:00082] [POST:RO] GNU_findutils find.1

> .\"O .SH OPTIONS
> .SH オプション

> .\"O This manual page talks about `options' within the expression list.
> .\"O These options control the behaviour of 
> .\"O .B find
> .\"O but are specified immediately after the last path name.  The five
> .\"O `real' options
> .\"O .BR \-H , 
> .\"O .BR \-L , 
> .\"O .BR \-P , 
> .\"O .B  \-D 
> .\"O and 
> .\"O .B  \-O
> .\"O must appear before
> .\"O the first path name, if at all.  A double dash 
> .\"O .B \-\-
> .\"O can also be used
> .\"O to signal that any remaining arguments are not options (though
> .\"O ensuring that all start points begin with either `./' or `/' is
> .\"O generally safer if you use wildcards in the list of start points).
> このマニュアルページで説明する「オプション」には、式の一部として
> 使われるものもある。そうしたオプションは、
> .B find
> の動作を制御するものであり、指定する位置は最後のパス名の直後になる。
> これに対して、
> .BR \-H ,
> .BR \-L ,
> .BR \-P ,
> .BR \-D ,
> .B  \-O
> という五つの「本来」のオプションは、指定するなら、最初のパス名の前で

個人的には、「指定するなら」ですが、「指定する場合には」などの方が
条件の意味合いが理解しやすいように感じました。

> 指定しなければならない。なお、ダッシュを二個重ねた
> .B \-\-
> も、以下の引き数はオプションではないことを明示する印として使用することが

「-- も」以降の部分で、「も」は also から来ていると思いますが、
日本語だと「〜も」は同様のものを続けるときに使うので、
少しニュアンスが違うように感じました。
この also は「また〜である」くらいの意味のように思いました。

また、「以下の引き数」は「以降の引き数」とするのはいかがでしょうか。

訳としては、

  また、以降の引き数がオプションではないことを明示する印として、
  ダッシュを二個重ねた -- を使用することができる。

とか

  また、ダッシュを二個重ねた -- は、それ以降の引き数がオプション
  ではないことを明示するオプションである。

などを考えてみました。いかがでしょうか。

> できる (それでも、探索の始点となるパス名のリストでワイルドカードを
> 使用するならば、始点のすべてが `./' か `/' で始まるように
> しておいた方が、たいていの場合無難である)。

> .\"O .IP
> .\"O When the 
> .\"O .B \-L 
> .\"O option is in effect, the 
> .\"O .B \-type 
> .\"O predicate will always
> .\"O match against the type of the file that a symbolic link points to
> .\"O rather than the link itself (unless the symbolic link is broken).
> .\"O Using 
> .\"O .B \-L 
> .\"O causes the 
> .\"O .B \-lname 
> .\"O and 
> .\"O .B \-ilname 
> .\"O predicates always to return
> .\"O false.
> .\"O 
> .IP
> .B \-L
> オプションが有効だと、述語
> .B \-type
> は (訳注: 「述語 predicate」とは、式を構成するオプション、判別式、
> アクションなどの基本語彙を言う)、リンクそのものに対してではなく、
> 常にシンボリックリンクが指しているファイルのタイプに対してマッチを
> 行うようになる(シンボリックリンクがリンク切れしている場合を除く)。
> .B \-L
> を使用すると、述語
> .B \-lname 
>> .B \-ilname
> は常に偽を返す。

「述語 predicate」の記載ですが、括弧が重なっても
「述語 (predicate)」の方が読みやすいように感じましたが、
いかがでしょうか。

> .\"O GNU 
> .\"O .B find
> .\"O frequently stats files during the processing of the command line
> .\"O itself, before any searching has begun.  These options also affect how
> .\"O those arguments are processed.  Specifically, there are a number of
> .\"O tests that compare files listed on the command line against a file we
> .\"O are currently considering.  In each case, the file specified on the
> .\"O command line will have been examined and some of its properties will
> .\"O have been saved.  If the named file is in fact a symbolic link, and
> .\"O the 
> .\"O .B \-P 
> .\"O option is in effect (or if neither 
> .\"O .B \-H 
> .\"O nor 
> .\"O .B \-L 
> .\"O were specified), the information used for the comparison will be taken from
> .\"O the properties of the symbolic link.  Otherwise, it will be taken from
> .\"O the properties of the file the link points to.  If
> .\"O .B find 
> .\"O cannot follow the link (for example because it has insufficient
> .\"O privileges or the link points to a nonexistent file) the properties of
> .\"O the link itself will be used.
> .\"O .P
> GNU
> .B find
> は実際の探索に取りかかる前にコマンドラインの処理を行うが、
> その際 stat システムコールを使ってファイルの情報を調べることが
> よくある。上述のオプションは、そのとき引き数がどう処理されるかにも
> 影響を与える。具体的に説明しよう。いくつのの判別式では、
> コマンドラインで指定したファイルを目下検査の対照になっているファイルと
                                              ^^^^
「対照」→「対象」

> 照合する。いづれの判別式でも、コマンドラインで指定したファイルは、

どちらでもいいのですが、「いづれ」は歴史的な仮名遣いですね。

現代仮名遣いでは「いずれ」ですね。
「ぢ」「づ」と記載するのは、同音の連呼 or 二語の結合 によって
生じた場合だけでそれ以外は「じ」「ず」と記載しますね。

> .\"O .IP stat
> .\"O Print messages as files are examined with the 
> .\"O .B stat 
> .\"O and 
> .\"O .B lstat 
> .\"O system calls.  The 
> .\"O .B find
> .\"O program tries to minimise such calls.
> .IP stat
> .B stat
>> .B lstat
> システムコールを使ってファイルが調べられたとき、
> メッセージを表示する。
> .B find
> プログラムは、そうしたシステムコールの回数を最少にしようとする。
                                              ^^^^
最少 → 最小、でしょうか。

> .\"O .RE
> .\"O .IP
> .\"O The cost-based optimiser has a fixed idea of how likely any given test
> .\"O is to succeed.  In some cases the probability takes account of the
> .\"O specific nature of the test (for example, 
> .\"O .B \-type f
> .\"O is assumed to be more likely to succeed than 
> .\"O .BR "\-type c" ).
> .\"O The cost-based optimiser is currently being evaluated.   If it does
> .\"O not actually improve the performance of 
> .\"O .BR find ,
> .\"O it will be removed again.  Conversely, optimisations that prove to be
> .\"O reliable, robust and effective may be enabled at lower optimisation
> .\"O levels over time.  However, the default behaviour (i.e. optimisation
> .\"O level 1) will not be changed in the 4.3.x release series.  The
> .\"O findutils test suite runs all the tests on 
> .\"O .B find
> .\"O at each optimisation level and ensures that the result is the same.
> .\"O .P
> .RE
> .IP
> コストに基づいた最適化機能は、ある判別式が真を返す確率について
> 一定の考えを持っている。場合によっては、その確率について、
> 問題のテストの特性が考慮されることもある (たとえば、
> .B \-type f
> は、
> .B \-type c
> よりも、真になる可能性が高いと見なされる)。
> コストに基づいた最適化機能は、現在のところその効果を評価中である。
> もし、それによって
> .B find
> の性能が実際に向上することがなければ、捨てられることになるだろう。
> 反対に、信頼性があり、問題を起こしにくく、効果的であることが
> はっきりした最適化は、そのうち下位の最適化レベルでも採用される
> かもしれない。とは言え、リリース 4.3.x のシリーズでは、
> デフォルトの動作 (すなわち、最適化レベル 1) を変更する予定はない。
> なお、findutils のソースに付属する一連のテストは、各最適化レベルの
> .B find
> ですべての判別式を実行して、結果が同じになることを保証している。

この部分ですが、すべての「判別式」ではなく、すべての「テスト」では
ないでしょうか。ここでいうテストは、find の動作で書かれている "test(s)"
ではなく、find の動作を検証するため、test set の方ではないでしょうか。

最適化レベルをどれにしても同じ動作になることを保証しようとしているので、
個別の判別式の動作を検証するだけではなく、評価順序が最適化レベルに
応じて変化するような場合についても「テスト」する必要がありますので。

「全ての最適化レベルで全てのテストを行い」くらいでしょうか。

-- 
Akihiro MOTOKI (amoto****@dd***** / amoto****@gmail*****)




linuxjm-discuss メーリングリストの案内
Back to archive index