Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

uudecode - decode a binary file

&pagelevel(4)&pagelevel

uuencode and uudecode are used in combination to send a text or binary file via mailx. You can send the file either directly or via a mailx chain linking a series of directly linked systems.

uudecode reads an encoded file and recreates the original file with the access permissions (file modes) and name specified in the encoding information (see uuencode on "uuencode encode a binary file").

You must have write permission for the encoded file.

uudecode runs with the user ID assigned to uucp. Thus permission to use uudecode may be denied in a directory where there is no write permission for "others".

Refer to uuencode for further information.


Syntax


uudecode[ file]

file

File to be decoded.

file not specified:
uudecode reads from standard input.

Locale

The following environment variables affect the execution of uudecode:

LANG

Provide a default value for the internationalization variables that are unset or null. If LANG is unset of null, the corresponding value from the implementation-specific default locale will be used. If any of the internationalization variables contains an invalid setting, the utility will behave as if none of the variables had been defined.

LC_ALL

If set to a non-empty string value, override the values of all the other internationalization variables.

LC_CTYPE

Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments and input files).

LC_MESSAGES

Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.

NLSPATH

Determine the location of message catalogs for the processing of LC_MESSAGES.

Example

User bill has been mailed an encoded file:

$ mailx

From john Wed Mar 11 14:42 MET 2009

Content_Length

begin 744 scrpt

M9F]R(&YA;64@*:6X@*@ID;R @:68@6R M9" B)&YA;64B(%T*(" @('!H)&X@

M)&-H;R B*&1V>BD@)&YA;64B" @("!;'-E(&%C:&\@(B!@;',@+7,@)&YA

1;65@(@H@(" @)FD*9&]N90HB

end

? q

The header line of the encoded message contains the word begin followed by the file mode (744) and the name of the file (scrpt). The file is now to be restored to its original condition and have the specified name scrpt:

$ mailx | uudecode

$ cat scrpt

for name in *

do  if [ -d "$name" ]

    then echo "(dir) $name"

    else echo " `ls -s $name`"

    fi
done

See also

mailx, uuencode