uuencode
file processingLinux/Unix
The uuencode command is one of the most frequently used commands in Linux/Unix-like operating systems. uuencode Encode a binary file into ASCII for transmission
Quick Reference
Command Name:
uuencode
Category:
file processing
Platform:
Linux/Unix
Basic Usage:
uuencode [options] [arguments]
Common Use Cases
Syntax
uuencode [-m] [file] name
Options
| Option | Description |
|---|---|
-m |
Use Base64 encoding instead of the traditional uuencode format |
--help |
Display help information and exit |
--version |
Output version information and exit |
Examples
How to Use These Examples
The examples below show common ways to use the uuencode command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
Encode a binary file using traditional uuencode format
uuencode image.jpg image.jpg > image.uu
Encode a binary file using base64 encoding
uuencode -m document.pdf document.pdf > document.b64
Encode standard input
cat file.bin | uuencode output.bin > file.uu
Advanced Examples:
Encode a file and pipe directly to email
uuencode attachment.zip attachment.zip | mail -s "Here's the attachment" [email protected]
Encode multiple files and concatenate the output
for file in *.jpg; do
Use with compression for better efficiency
gzip -c large_file | uuencode large_file.gz > large_file.uu