[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
/usr/bin/mail-files
/usr/bin/mailshar
/usr/bin/remsync
/usr/bin/shar
/usr/bin/unshar
/usr/bin/uudecode
/usr/bin/uuencode
/usr/share/info/remsync.info.gz
/usr/share/info/sharutils.info.gz
/usr/share/locale/de/LC_MESSAGES/sharutils.mo
/usr/share/locale/fr/LC_MESSAGES/sharutils.mo
/usr/share/locale/ja/LC_MESSAGES/sharutils.mo
/usr/share/locale/nl/LC_MESSAGES/sharutils.mo
/usr/share/locale/pt/LC_MESSAGES/sharutils.mo
/usr/share/locale/sv/LC_MESSAGES/sharutils.mo
/usr/share/man/man1/shar.1.gz
/usr/share/man/man1/unshar.1.gz
/usr/share/man/man1/uudecode.1.gz
/usr/share/man/man1/uuencode.1.gz
/usr/share/man/man5/uuencode.5.gz

[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
CmhlbGxvIHdvcmxkIQoKCg==
====

[root@blockader tmp]# rm test.txt

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

[root@blockader tmp]# cat test.txt

hello world!


Google