[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to use uuencode and uudecode to encode / decode base64 file

how to use uuencode and uudecode to encode / decode base64 file

[root@blockader tmp]# rpm -qi sharutils
Name        : sharutils                    Relocations: (not relocatable)
Version     : 4.2.1                             Vendor: Red Hat, Inc.
Release     : 22.2.FC3                      Build Date: Tue 12 Apr 2005 01:40:47 AM EST
Install Date: Sat 29 Jan 2000 06:33:35 AM EST      Build Host: tweety.build.redhat.com
Group       : Applications/Archiving        Source RPM: sharutils-4.2.1-22.2.FC3.src.rpm
Size        : 213111                           License: GPL
Signature   : DSA/SHA1, Fri 15 Apr 2005 01:09:31 AM EST, Key ID b44269d04f2a6fd2
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary     : The GNU shar utilities for managing shell archives.
Description :
The sharutils package contains the GNU shar utilities, a set of tools
for encoding and decoding packages of files (in binary or text format)
in a special plain text format called shell archives (shar). This
format can be sent through email (which can be problematic for regular
binary files). The shar utility supports a wide range of capabilities
(compressing, uuencoding, splitting long files for multi-part
mailings, providing checksums), which make it very flexible. After the
files have been sent, the unshar tool scans mail messages looking for
shar files. Unshar automatically strips off mail headers and
introductory text and then unpacks the shar files.

[root@blockader tmp]# rpm -ql sharutils

[root@blockader tmp]# cat test.txt 

hello world!

[root@blockader tmp]# uuencode -m test.txt test.txt > test.txt.base64

[root@blockader tmp]# cat test.txt.base64 
begin-base64 644 test.txt

[root@blockader tmp]# rm test.txt

[root@blockader tmp]# uudecode test.txt.base64 

[root@blockader tmp]# cat test.txt

hello world!