1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/base64.md

25 lines
463 B
Markdown
Raw Normal View History

2014-07-14 21:50:44 +08:00
# base64
> Encode or decode file or `stdin` to/from base64, to `stdout`.
> More information: <https://manned.org/base64>.
2014-07-14 21:50:44 +08:00
- Encode a file:
2014-07-14 21:50:44 +08:00
`base64 {{path/to/file}}`
2014-07-14 21:50:44 +08:00
2024-03-17 01:11:21 +11:00
- Wrap encoded output at a specific width (`0` disables wrapping):
`base64 {{-w|--wrap}} {{0|76|...}} {{path/to/file}}`
2024-03-17 01:11:21 +11:00
- Decode a file:
2014-07-14 21:50:44 +08:00
`base64 {{-d|--decode}} {{path/to/file}}`
2014-07-14 21:50:44 +08:00
- Encode from `stdin`:
2014-07-14 21:50:44 +08:00
`{{command}} | base64`
2014-07-14 21:50:44 +08:00
- Decode from `stdin`:
2014-07-14 21:50:44 +08:00
`{{command}} | base64 {{-d|--decode}}`