Files
tldr/pages.zh/osx/base64.md

28 lines
738 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# base64
> 编码或解码文件或 `stdin` 到/从 base64输出到 `stdout` 或另一个文件。
> 更多信息:<https://keith.github.io/xcode-man-pages/base64.1.html>。
- 将文件编码到 `stdout`
`base64 {{-i|--input}} {{path/to/file}}`
- 将文件编码到指定的输出文件:
`base64 {{-i|--input}} {{path/to/input_file}} {{-o|--output}} {{path/to/output_file}}`
- 在特定宽度下换行编码输出(`0` 禁用换行):
`base64 {{-b|--break}} {{0|76|...}} {{path/to/file}}`
- 将文件解码到 `stdout`
`base64 {{-d|--decode}} {{-i|--input}} {{path/to/file}}`
-`stdin` 编码到 `stdout`
`{{command}} | base64`
-`stdin` 解码到 `stdout`
`{{command}} | base64 {{-d|--decode}}`