'.\" Copyright (c) 1980, 1990 The Regents of the University of California. '.\" All rights reserved. '.\" '.\" Redistribution and use in source and binary forms, with or without '.\" modification, are permitted provided that the following conditions '.\" are met: '.\" 1. Redistributions of source code must retain the above copyright '.\" notice, this list of conditions and the following disclaimer. '.\" 2. Redistributions in binary form must reproduce the above copyright '.\" notice, this list of conditions and the following disclaimer in the '.\" documentation and/or other materials provided with the distribution. '.\" 3. All advertising materials mentioning features or use of this software '.\" must display the following acknowledgement: '.\" This product includes software developed by the University of '.\" California, Berkeley and its contributors. '.\" 4. Neither the name of the University nor the names of its contributors '.\" may be used to endorse or promote products derived from this software '.\" without specific prior written permission. '.\" '.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND '.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE '.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE '.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE '.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL '.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS '.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) '.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT '.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY '.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF '.\" SUCH DAMAGE. '.\" '.\" Modified from '.\" @(#)uuencode.1 6.9 (Berkeley) 4/23/91 '.\" .\" Japanese Version Copyright (c) 1994-2000 .\" NetBSD jman proj. and Yuichi SATO .\" all rights reserved. .\" Translated Thu Nov 17 1994 .\" by NetBSD jman proj. .\" Updated Tue Jun 20 21:37:49 JST 2000 .\" by Yuichi SATO .\" .\"WORD: encode エンコード .\"WORD: decode デコード .\" .TH uuencode 1 .SH 名前 uuencode \- バイナリファイルをエンコードする .PP uudecode \- uuencode で作成されたファイルをデコードする .SH 書式 .B uuencode [\-m] [ file ] name .PP .B uudecode [-o outfile] [ file ]... .SH 説明 .I uuencode と .I uudecode は、単純なアスキーデータしかサポートしていない 伝送路を用いて、バイナリファイルを送るために使われる。 .PP .I uuencode は .I file (デフォルトでは標準入力) を読み込み、 エンコードしたものを標準出力に書き出す。 エンコードには表示可能なアスキー文字のみが使われる。 このデータには .I uudecode が使うファイルのアクセス権とオペランド名 .I name が含まれる。 .I name が .I /dev/stdout の場合、 結果は標準出力に書き出される。 デフォルトでは、標準的な UU エンコーディング形式が使われる。 オプション .I \-m がコマンドラインから指定されると、 .B base64 エンコーディングが代わりに使われる。 .PP .I uudecode は、uuencode された .I files (デフォルトでは標準入力) を元の形に変換する。 結果のファイルは、name (\-o オプションが指定された場合は、 .IR outfile ) という名前が付けられ、 setuid と実行ビットが保存されない以外は、 元のファイルと同じアクセス権を持つ。 .I outfile や .I name が /dev/stdout の場合、結果は標準出力に書き出される。 .I uudecode は、(uuencode 部分の) 前後のすべての行を無視する。 プログラムは、(UU と base64 の) どちらのエンコード形式が使われているかを、 自動的に判断することができる。 .SH 例 次の例では、ソースツリーを (tar で) まとめ、compress し、 uuencode して、他のシステム上のユーザーにメールで送っている。 相手のシステムで .I uudecode が実行されると、ファイル ``src_tree.tar.Z'' が作られる。 このファイルは、uncompress した後、 元のソースツリーを (tar で) 取り出すことができる。 .PP .IP .NF tar cf \- src_tree \&| compress \&| uuencode src_tree.tar.Z \&| mail sys1!sys2!user .FI .LP .SH 関連項目 compress(1), mail(1), uucp(1), uuencode(5) .SH 準拠 この実装は P1003.2b/D11 に準拠する。 .SH バグ .I uudecode に 2 つ以上のファイルを渡して \-o オプションを指定した場合や、 エンコードする複数のファイル中に同じ .I name が 2 つ以上あった場合、結果は期待したようにはならないだろう。 .PP エンコードされた形式では、UU エンコードの場合 37%、 base64 エンコードの場合 35% サイズが大きくなる (3 バイトのデータが 4 バイト + 制御情報になる)。 .SH 履歴 .I uuencode コマンドは BSD 4.0 で登場した。