Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

basenc

v(uutils coreutils) 0.8.0
basenc [OPTION]... [FILE]

Encode/decode data and print to standard output With no FILE, or when FILE is -, read standard input.

When decoding, the input may contain newlines in addition to the bytes of the formal alphabet. Use –ignore-garbage to attempt to recover from any other non-alphabet bytes in the encoded stream.

Options

--decode, -d, -D

base-common-help-decode

--ignore-garbage, -i

base-common-help-ignore-garbage

--wrap=<COLS>, -w <COLS>

base-common-help-wrap

--base64

same as ‘base64’ program

--base64url

file- and url-safe base64

--base32

same as ‘base32’ program

--base32hex

extended hex alphabet base32

--base16

hex encoding

--base2lsbf

bit string with least significant bit (lsb) first

--base2msbf

bit string with most significant bit (msb) first

--z85

ascii85-like encoding;
when encoding, input length must be a multiple of 4;
when decoding, input length must be a multiple of 5

--base58

visually unambiguous base58 encoding

Examples

Encode a file with base64 encoding:

basenc --base64 {{path/to/file}}

Decode a file with base64 encoding:

basenc {{[-d|--decode]}} --base64 {{path/to/file}}

Encode from stdin with base32 encoding with 42 columns:

{{command}} | basenc --base32 {{[-w|--wrap]}} 42

Encode from stdin with base32 encoding:

{{command}} | basenc --base32

The examples are provided by the tldr-pages project under the CC BY 4.0 License.

Please note that, as uutils is a work in progress, some examples might fail.