← 返回命令列表

Linux command

uuencode 命令

文件

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Encode a binary file

uuencode [file] [encoded_name] > [output.txt]

Encode using base64

uuencode -m [file] [encoded_name]

Encode from stdin

cat [file] | uuencode [encoded_name]

Encode and email a file

uuencode [file] [file] | mail -s "Subject" [user@example.com]

Compress and encode

gzip -c [file] | uuencode [file.gz]

说明

uuencode encodes binary files into ASCII text for transmission over channels that only support text, such as email or older network protocols. The encoded output includes the file mode and name for reconstruction by uudecode. By default, uuencode uses traditional UU encoding (Unix-to-Unix encoding). The -m option enables base64 encoding, which is more widely used in modern systems. UU encoding expands file size by approximately 37%, while base64 expands by 35%. The output format includes a header line with file permissions and name, encoded data lines, and a termination line.

参数

-m
Use base64 encoding instead of traditional UU encoding.

FAQ

What is the uuencode command used for?

uuencode encodes binary files into ASCII text for transmission over channels that only support text, such as email or older network protocols. The encoded output includes the file mode and name for reconstruction by uudecode. By default, uuencode uses traditional UU encoding (Unix-to-Unix encoding). The -m option enables base64 encoding, which is more widely used in modern systems. UU encoding expands file size by approximately 37%, while base64 expands by 35%. The output format includes a header line with file permissions and name, encoded data lines, and a termination line.

How do I run a basic uuencode example?

Run `uuencode [file] [encoded_name] > [output.txt]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -m do in uuencode?

Use base64 encoding instead of traditional UU encoding.