aboutsummaryrefslogtreecommitdiff
path: root/ja_JP.eucJP/man/man1/uuencode.1
blob: 655b4faa90c676e46a9dade0917665bb4b946d44 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
.\" Copyright (c) 1980, 1990, 1993
.\"	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.
.\"
.\"     @(#)uuencode.1	8.1 (Berkeley) 6/6/93
.\"	%Id: uuencode.1,v 1.3.2.2 1998/03/08 14:29:22 jkh Exp %
.\" jpman %Id: uuencode.1,v 1.2 1997/03/29 11:57:08 horikawa Stab %
.\"
.Dd June 6, 1993
.Dt UUENCODE 1
.Os BSD 4
.Sh 名称
.Nm uuencode ,
.Nm uudecode
.Nd バイナリファイルのエンコード、デコード
.Sh 書式
.Nm uuencode
.Op Ar file
.Ar name
.Nm uudecode
.Op Fl cips
.Op Ar
.Sh 解説
.Nm uuencode
および
.Nm uudecode
は
.Tn ASCII
データ以外のデータ転送をサポートしてない伝送路を用いてバイナリファイル
を送る場合に用いられます。
.Pp
.Nm uuencode
は
.Ar file
(無指定時には標準入力) よりデータを読み込み、符号化されたデータを標準
出力へ出力します。出力データには、
.Tn ASCII
キャラクタしか含まれません。また、このデータには、
.Nm uudecode 
を用いて元のファイルを復元する時に必要となるファイルのモードと
.Ar name
が含まれます。
.Pp
.Nm uudecode
は
.Em uuencode
によって生成されたファイル (もしくは、標準入力からのデータ) を元の形式
に変換します。生成されるファイルは、
.Nm uudecode
時に指定された名前 (
.Ar name
) になり、ファイルモードなどは変換前のものが採用されま
すが、setuid ビットと実行ビットは引き継がれません。本プログラムは
.Nm uuencode
された部分の前および後ろにいかなる情報が付加されていようと、それらを無視して
.Nm uuencode
された部分にのみ処理をかけます。
.Pp
以下のオプションを
.Nm uudecode
で使用可能です:
.Bl -tag -width ident
.It Fl c
.Ar file 
から、可能であるならば複数の uuencode されたファイルをデコードします。
.It Fl i
ファイルの上書きをしません。
.It Fl p
.Ar file
をデコードし、標準出力に出力します。
.It Fl s
出力パス名をベース名に縮めません。
セキュリティのために、デフォルトでは
.Nm uuencode
は最後のスラッシュ '/' より前のプレフィックスを除去します。
.Sh 使用例
ソースツリーを compress し、uuencode し、別のシステムにメールで送る例を
以下に示します。
.Nm uudecode
が転送される側のシステムで実行されると、
``src_tree.tar.Z'' が生成されます。
このファイルはその後 uncompress され、元のツリーが展開されるでしょう。
.Pp
.Bd -literal -offset indent -compact
tar cf \- src_tree \&| compress \&|
uuencode src_tree.tar.Z \&| mail sys1!sys2!user
.Ed

以下の例では、すべての uuencode されたファイルを、
あなたのメールボックスから現在の作業ディレクトリへ展開します。
.Pp
.Bd -literal -offset indent -compact
uudecode -c < $MAIL
.Ed

以下の例では、compress された tar アーカイブをあなたのメールボックスから
展開します。
.Pp
.Bd -literal -offset indent -compact
uudecode -p < $MAIL | zcat | tar xfv -
.Ed
.Sh 関連項目
.Xr basename 1 ,
.Xr compress 1 ,
.Xr mail 1 ,
.Xr uucp 1 ,
.Xr uuencode 5
.Sh バグ
符号化されたファイルの大きさは、元のファイルの大きさに比較して 35% ほ
ど大きくなります。これは、3byte のデータを 4byte + 制御符号に変換する
ためです。
.Sh 歴史
.Nm uuencode
および
.Nm uudecode
は
.Bx 4.0
から登場しました。