ºìÁªLinuxÃÅ»§
Linux°ïÖú

uuencode±àÂëºÍ½âÂë

·¢²¼Ê±¼ä:2006-07-30 10:01:27À´Ô´:ºìÁª×÷Õß:bear10214
uuencodeÊÇÒÔÇ°unixϳ£ÓñàÂ뷽ʽӦÓÃÓÚUUCP(unix to unix copy),ͨ¹ý´®ÐÐͨѶ´«
Êä¶þ½øÖÆÎļþ.base64ÊôÓÚMIME(¶àÓÃ;¹ú¼Ê»¥ÁªÍø
ÓʼþÀ©Õ¹)±àÂë,Óëuuencode²»ÊÇͬһ¸ö·¶³ëµÄ,MIMEÖ÷ÒªÓ¦ÓÃÓÚÓʼþ,UuencodeÖ÷ÒªÓ¦ÓÃ
ÔÚÓʼþºÍÐÂÎÅ×é.
uuencodeµÄ¿ªÍ·ÊÇ:
begin <ģʽ> <ÎļþÃû>
<Êý¾Ý>
end
±àÂëË㷨Ϊ²»¶ÏµØÓÃ3¸ö×Ö½ÚÊý¾ÝÁгÉÒ»×é(²»×ã3¸ö×Ö½ÚÒÔÁã²¹Æë)È»ºó ´Ë24λÊý¾Ý·Ö
Ϊ4×é,ÿ×é6λ,ÔÙ½«µÃµ½µÄ6λ¶þ½øÖÆÊýÓ³Éäµ½ASCIIÂë32~95Ö®¼äµÄ×Ö·û,¶øÿÐÐÒÔM ¿ªÍ·(±íʾ32+45),60¸ö×Ö·ûÒ»ÐÐ(°üÀ¨¡±M¡±),×îºóÒ»ÐÐÒÔ32+N µÄASCII×Ö·û¿ªÍ·,N Ϊ×îºóÒ»ÐбàÂëµÄÊäÈë×Ö½ÚÊý.±àÂëÒÔÒ»¸öÖ»º¬Ò»¸ö¿Õ¸ñµÄÒ»ÐкÍÖ»º¬¡±end¡±µÄÒ»ÐнáÊø.
eg.
begin .....
M1&%T93H(¡°'@(¡°'@(#0O-2'\Y-2'Y.C,S.C$P($%-#0I&M2&5NM;VIE=VIE8V1E8VJD92!PM;W(@8F%S938T(¡®1R86YS9F5R(&9OÃû³Æ£ºuuencode
ʹÓÃȨÏÞ£ºËùÓÐʹÓÃÕß
ʹÓ÷½Ê½£ºuuencode [-hv] [sourcefile] targetfile
˵Ã÷£º
ÔçÆÚÔÚÐí¶à unix ϵͳµÄ´«ËÍЭ¶¨Ö»ÄÜ´«ËÍÆßλԪ×ÖÔª£¬²¢²»Ö§Ô®¶þ½øλµµ°¸£¬ÏñÖÐÎÄÎÄ×Öµµ¾ÍÓÐÓõ½°ËλԪ£¬ËùÒÔÎÞ·¨ÍêÕûµØË͵½ÁíÒ»¼Ü»úÆ÷ÉÏ¡£ uuencode Ö¸Á¿ÉÒÔ½«¶þ½øλµµ×ª»»³ÉÆßλԪµÄµµ°¸£¬´«Ë͵½ÁíÒ»¼Ü»úÆ÷ÉÏÔÙÒÔ uudecode »¹Ô­¡£×î³£¼ûµÄÊÇÓÃÔÚÒÔµç×ÓÓʼþ´«ËͶþ½øλµµ¡£uuencode ±àÂëºóµÄ×ÊÁ϶¼ÒÔ begin ¿ªÊ¼£¬ÒÔ end ×÷Ϊ½áÊø¡£
begin 644 decode.dat
£¨ÄÚÈݱàÂ룩
`
end
begin ºóµÄ 644 ÊÇ unix µµ°¸µÄµ÷ÓÃȨÏÞ´úÂë¡£¶ø decode.dat ÔòÊÇ»¹Ô­ºóµÄµµÃû¡£
²ÎÊý£º
h ÁгöÖ¸ÁîʹÓøñʽ (help)
v Áгö°æ±¾Ñ¶Ï¢ (version)
·¶Àý£º
½« source.dat ±àÂëºó´æ³É file.uud µµ¡£ÓÉÓÚ uuencode »á½«±àÂëºóµÄ×ÊÁÏÔÚÓ«Ä»ÉÏÁгö£¬ËùÒÔ±ØÐ뽫×ÊÁϵ¼Èë file.uud ÖУ¬¶ø target.dat ÊÇ file.uud »¹Ô­ºóµÄµµ°¸Ãû×Ö£¬¶ø²»ÊDZàÂëºóµÄµµ°¸¡£
uuencode source.dat target.dat > file.uud
Ö´ÐÐÖ¸Áîºó£¬Óɱê×¼ÊäÈë×°ÖöÁÈë×ÊÁÏ£¬¼òµ¥µØ˵ÊÇÓɼüÅÌÊäÈëºóÔÚÓ«Ä»ÏÔʾµÄ×ÊÁÏ£¬°´ Crtl + d ¼üºó¾Í»á±»±àÂ룬Êä³öÖÁ file.uud ÖС£ÓÉÓÚ³ÌÐòÊÇÒÔÐÐΪ´¦Àíµ¥Î»£¬ÈôÎÞ·¨Ìø³ö³ÌÐò£¬Çë¶à°´¼¸´Î Ctrl + d Ö±µ½³ÌÐò½áÊøΪֹ¡£
uuencode target.dat > file.uud
ÀàËÆÉÏÒ»¸öÖ¸Á²»¹ýʹÓÃÒ»¸öµ¼ÈëµÄ¼¼ÇÉ£¬½« source.dat ѹËõºóµÄ×ÊÁÏ´«Ë͸ø uuencode ´¦ÀíÖ®ºó£¬´æ³É file.uud µµ¡£ file.uud µµ»¹Ô­ºó¾ÍÊÇ source.dat.Z µµ¡£
compress -c source.dat | uuencode source.dat.Z > file.uud
ÏÔʾ°æ±¾Ñ¶Ï¢ºó£¬½áÊøÖ´ÐгÌÐò¡£
uuencode -v
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ