Linux uuencode command
The Linux uuencode command is used to convert binary files to ASCII text format for sending via email or other transmission methods.
This conversion allows files to be sent over channels that only support text transmission (such as email), and the receiving end uses the uudecode command to restore them to the original binary file.
Syntax
uuencode [input-file] [output-file]
Parameter description:
input-file: The binary file to be converted.output-file: The converted file name, which can also be the attachment name in the email.
Decode file:
uudecode <encoded_filename>
Here <encoded_filename> is the encoded file name.
Examples
Suppose you have a binary file example.bin, and you want to convert it to ASCII format and save it to the encoded.txt file:
uuencode example.bin example.bin > encoded.txt
This command converts the example.bin file to ASCII encoding and redirects the output to the encoded.txt file.
Decoding
You can use uudecode to decode this file:
uudecode encoded.txt
This command reads the encoded.txt file and generates the original example.bin file.
Other Extensions
Linux Command Encyclopedia