HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

basenc — Encode or decode file or `stdin` using a specified encoding, to `stdout`. More information: <https:/

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandbasencclidecodeencodefilestdinusing

Problem

How to use the basenc command: Encode or decode file or stdin using a specified encoding, to stdout. More information: <https://www.gnu.org/software/coreutils/manual/html_node/basenc-invocation.html>.

Solution

basenc — Encode or decode file or stdin using a specified encoding, to stdout. More information: <https://www.gnu.org/software/coreutils/manual/html_node/basenc-invocation.html>.

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

Code Snippets

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

Context

tldr-pages: common/basenc

Revisions (0)

No revisions yet.