'\" te .\" Copyright 1989 AT&T .\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved .\" Portions Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. This notice shall appear on any product containing this material. .TH strings 1 "2011 年 6 月 8 日" "SunOS 5.11" "ユーザーコマンド" .SH 名前 strings \- オブジェクトファイルおよびバイナリファイルからの印字可能な文字列の検索 .SH 形式 .LP .nf \fBstrings\fR [\fB-a\fR | \fB-\fR] [\fB-t\fR \fIformat\fR | \fB-o\fR] [\fB-n\fR \fInumber\fR | \fB-number\fR] [\fB-N\fR \fIname\fR] [\fIfile\fR]... .fi .SH 機能説明 .sp .LP \fBstrings\fR ユーティリティーは、バイナリファイル中の \fBASCII\fR 文字列を探します。文字列は、4 バイト以上の印字可能文字で、復帰改行 (NEWLINE) または \fBNULL\fR 文字で終わらなければなりません。 .sp .LP \fBstrings\fR はランダムオブジェクトファイルなどを識別するのに便利です。 .sp .LP デフォルトでは、文字列はメモリーにロードされるプログラムセクションを検索します。プログラムセクションは、セクションタイプ \fBSHT_PROGBITS\fR で識別されます。メモリーにロードされるセクションは、セクションフラグ \fBSHF_ALLOC \fR で識別されます。ファイルに関する完全なセクション情報を表示するには、\fBelfdump\fR(1) を使用します。 .sp .LP すべてのセクションは \fB-a\fR オプションで検査できます。個々のセクションは \fB-N\fR オプションで検査できます。 .SH オプション .sp .LP サポートしているオプションは、次のとおりです。 .sp .ne 2 .mk .na \fB\fB-a\fR | \fB–\fR \fR .ad .RS 24n .rt ファイル全体を検索の対象とします。 .RE .sp .ne 2 .mk .na \fB\fB-n\fR \fInumber\fR \fB |\fR \fB-\fR\fInumber\fR\fR .ad .RS 24n .rt \fInumber\fR を最短文字列のバイト数とします。 デフォルトは \fB4\fR バイトです。無効な数字を指定すると、デフォルトの文字列の長さが使用されます。 .RE .sp .ne 2 .mk .na \fB\fB-N\fR \fIname\fR\fR .ad .RS 24n .rt ELF セクション名のみを調べます。\fBelfdump\fR(1) を参照してください。複数の \fB-N\fR オプションを指定すると、複数のセクションを検査できます。 .sp \fB-a\fR または \fB-\fR オプションを指定した場合は、すべての \fB-N\fR オプションが無視されます。 .RE .sp .ne 2 .mk .na \fB\fB-o\fR\fR .ad .RS 24n .rt \fB\fR\fB-t\fR\fB d\fR オプションと同等の機能です。 .RE .sp .ne 2 .mk .na \fB\fB-t\fR \fBformat\fR\fR .ad .RS 24n .rt ファイル内での先頭からのバイトオフセットの値を 文字列の前に付加して各文字列を出力します。出力形式は、オプション引数の \fIformat\fR により 1 文字で指定します。 .sp .ne 2 .mk .na \fB\fBd\fR\fR .ad .RS 5n .rt オフセットを 10 進数で出力 .RE .sp .ne 2 .mk .na \fB\fBo\fR\fR .ad .RS 5n .rt オフセットを 8 進数で出力 .RE .sp .ne 2 .mk .na \fB\fBx\fR\fR .ad .RS 5n .rt オフセットを 16 進数で出力 .RE .RE .SH オペランド .sp .LP 次のオペランドを指定できます。 .sp .ne 2 .mk .na \fB\fB\fIfile\fR\fR \fR .ad .RS 9n .rt 入力に用いる通常ファイルのパス名。\fIfile\fR オペランドを省略すると、\fBstrings\fR ユーティリティーは標準入力から読み込みます。 .RE .SH 環境 .sp .LP \fBstrings\fR の実行に影響を与える次の環境変数についての詳細は、\fBenviron\fR(5) を参照してください。 \fBLANG\fR、\fBLC_ALL\fR、\fBLC_CTYPE\fR、\fBLC_MESSAGES\fR、および \fBNLSPATH\fR。 .SH 終了ステータス .sp .LP 次の終了ステータスが返されます。 .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt 正常終了。 .RE .sp .ne 2 .mk .na \fB>\fB0\fR\fR .ad .RS 6n .rt エラーが発生した。 .RE .SH 属性 .sp .LP 属性についての詳細は、マニュアルページの \fBattributes\fR(5) を参照してください。 .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . 属性タイプ属性値 _ 使用条件system/core-os _ CSI有効 _ インタフェースの安定性下記を参照。 .TE .sp .LP \fBstrings\fR ユーティリティー (\fB-N\fR を除くすべてのオプションを含む) は標準で指定されています。\fBstandards\fR(5) を参照してください。現在、\fB-N\fR オプションは標準で指定されていません。 .SH 関連項目 .sp .LP \fBelfdump\fR(1), \fBod\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5) .SH 注意事項 .sp .LP 文字列を認識するアルゴリズムは、きわめて原始的です。 .sp .LP 旧バージョンとの互換性において、 \fB-a\fR の代わりに \fB–\fR を指定することができます。