base64.1 (1478B)
- .\" utils-std: Collection of commonly available Unix tools
 - .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
 - .\" SPDX-License-Identifier: MPL-2.0
 - .Dd October 12, 2024
 - .Dt BASE64 1
 - .Os
 - .Sh NAME
 - .Nm base64
 - .Nd encode/decode base64 data to standard output
 - .Sh SYNOPSIS
 - .Nm
 - .Op Fl d
 - .Op Fl w Ar wrap
 - .Op Ar file...
 - .Sh DESCRIPTION
 - .Nm
 - reads
 - .Ar file ,
 - encodes or decodes in base64 and writes the results into standard output.
 - If no
 - .Ar file
 - is given,
 - .Nm
 - reads from the standard input.
 - .Pp
 - .\" https://todo.sr.ht/~lanodan/utils-std/5
 - Should be noted that the terminal-driver stdin buffering
 - can have a maximum amount of characters per line
 - (4096 on Linux, see
 - .Xr tcsetattr 3 Ns ).
 - So for copy-pasting large amounts of data you should either
 - pipe it from a command like
 - .Xr wl-paste 1
 - or
 - .Xr xclip 1 ,
 - or generate base64 data with a line length shorter
 - than the terminal driver buffer,
 - for example via:
 - .Dl Cm base64 -w $(tput cols)
 - .Sh OPTIONS
 - .Bl -tag -width _w_wrap
 - .It Fl d
 - Decode input instead of encoding it.
 - .It Fl w Ar wrap
 - Write at most
 - .Ar wrap
 - characters per line instead of the default of 76 characters.
 - If
 - .Ar wrap
 - is 0, then no newlines are written.
 - .El
 - .Sh EXIT STATUS
 - .Ex -std
 - .Sh SEE ALSO
 - .Xr uuencode 1
 - .Sh STANDARDS
 - .Nm
 - follows base64 as defined in RFC3548 and RFC4648.
 - .Sh HISTORY
 - A
 - .Nm
 - utility first appeared in GNU Coreutils 6.0 (2006-08-15),
 - .Fx 4.3 ,
 - .Nx 9
 - .Sh AUTHORS
 - .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me