matsuand です。 返信が極端に遅くなり、大変恐縮です。 ご指摘に回答します。 On Thu, Sep 30, 2021 at 10:09 PM ribbon <jm****@ribbo*****> wrote: > > 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 07)。 > > > [原文] > > .IP "-regex pattern" > > File name matches regular expression .IR pattern . This is > > a match on the whole path, not a search. For example, to > > match a file named .IR ./fubar3, you can use the regular > > expression `.*bar.' or `.*b.*3', but not `f.*r3'. The > > regular expressions understood by .B find are by default > > Emacs Regular Expressions (except that `.' matches > > newline), but this can be changed with the .B -regextype > > option. > > [訳文] > > .IP "-regex pattern" > > ファイル名が正規表現 pattern > > に一致するかどうかをテストします。 この処理は、 > > パス全体への一致を確認するものであって、 > > ファイル検索ではありません。 したがってたとえば、 > > `./fubar3' ファイルに一致する正規表現として、 `.*bar.' や > > `.*b.*3' は利用できますが、 `f.*r3' は利用できません。 find > > が扱う正規表現のデフォルトは、 Emacs 正規表現です。 > > これは、 -regextype > > オプションを用いて変更することができます。 > > が扱う正規表現のデフォルトは、 Emacs 正規表現です。 > -> > が扱う正規表現のデフォルトは、 ( '.' が改行に一致することを除き) Emacs の正規表現です。 ご指摘そのとおりです。括弧書き部分が訳漏れでした。 なお単語の流れどおりに訳すことを良しとする考えから、 括弧書きは文末に持っていきます。 [新訳] find が扱う正規表現のデフォルトは、 Emacs 正規表現です ('.' が改行に一致する点は除きます)。 > > [原文] > > .IP > > The size is simply the st_size member of the struct stat > > populated by the lstat (or stat) system call, rounded up as > > shown above. In other words, it's consistent with the > > result you get for .BR "ls\ -l" . Bear in mind that the > > `%k' and `%b' format specifiers of .B -printf handle sparse > > files differently. The `b' suffix always denotes 512-byte > > blocks and never 1024-byte blocks, which is different to > > the behaviour of .BR -ls . > > [訳文] > > .IP > > サイズというのは単純に、システムコールの lstat (あるいは > > stat) に含まれている struct stat の メンバー st_size > > のことであり、上に示すようにして丸められます。言い換えると、 > > その結果は ls\ -l で得られるものと一致します。-printf > > における `%k' と `%b' の書式指定子は、 > > スパースファイルに対して、 > > 異なる扱いをする点に注意してください。 サフィックス `b' > > は、 常に 512 バイトブロックを表していて、 1024 > > バイトブロックを表すことはありません。 この点は、 -ls > > の動作とは異なるところです。 > > 丸められます。 > -> > 切り上げられます。 > # round up なので。 ご指摘のとおりです。そのように修正します。 > > ---------------------------------------- > > [原文] > > .IP > > The + and - prefixes signify greater than and less than, as > > usual; i.e., an exact size of n units does not match. Bear > > in mind that the size is rounded up to the next unit. > > Therefore .B -size\ -1M is not equivalent to .BR "-size\ > > -1\|048\|576c" . The former only matches empty files, the > > latter matches files from 0 to 1,048,575 bytes. > > [訳文] > > .IP > > プレフィックスの + と - は、 ごく普通に、 それより上、 > > それより下、 を表します。 したがって、 n > > とちょうど同じ数には一致しません。 サイズとは、 > > 次の数単位に向けて丸められることに注意しておいてください。 > > つまり -size\ -1M というのは、 -size\ -1\|048\|576c > > と同じではありません。 前者は、 > > 空のファイルにしか一致しません。 また後者は、 > > バイトサイズが 0 から 1,048,575 > > までのファイルに一致します。 > > 丸められる > -> > 切り上げられる ご指摘のとおりです。そのように修正します。 > > [原文] > > .IP "-writable" > > Matches files which are writable by the current user. This > > takes into account access control lists and other > > permissions artefacts which the .B -perm test ignores. > > This test makes use of the .BR access (2) system call, and > > so can be fooled by NFS servers which do UID mapping (or > > root-squashing), since many systems implement .BR access > > (2) in the client's kernel and so cannot make use of the > > UID mapping information held on the server. > > [訳文] > > .IP -writable > > 現行ユーザーによって書き込み可能なファイルであるかどうかをテ > > ストします。 このテストは、 アクセスコントロールリスト > > (access control list; ACL) や、 > > その他のパーミッション機能を考慮します。 ちなみに、 テスト > > -perm では無視されます。 本テストは、 システムコール > > access(2) を利用するので、 NFS サーバーが UID マッピング > > (つまり root squash) を行っている場合に、 > > 適切に動作しない場合があります。 多くのシステムでは、 > > クライアントのカーネルにおいて access(2) > > を実装しているため、 サーバー側にある UID > > マッピング情報を利用できないからです。 > > 現行ユーザー > -> > 現在のユーザ ご指摘の訳が適切と思いますので、そのように修正します。 > > ---------------------------------------- > > [原文] > > .IP "-xtype c" > > The same as .B -type unless the file is a symbolic link. > > For symbolic links: if the .B -H or .B -P option was > > specified, true if the file is a link to a file of type .IR > > c ; if the .B -L option has been given, true if c is `l'. > > In other words, for symbolic links, .B -xtype checks the > > type of the file that .B -type does not check. > > [訳文] > > .IP "-xtype c" > > 対象ファイルがシンボリックリンクでなければ、 -type > > と同様です。 > > シンボリックリンクのときは、以下のように動作します。 -H や > > -P オプションの指定時は、 リンク先がタイプ c > > のファイルであれば、 true を返します。 -L > > オプションの指定時は、 c が `l' ならば true を返します。 > > 言い換ると、 シンボリックリンクに対して、 -xtype は、 -type > > がチェックしないファイルタイプをチェックします。 > > ---------------------------------------- > > 言い換ると > -> > 言い換えると ご指摘のとおりです。修正します。