Files
tldr/pages.zh/osx/split.md
2024-06-19 00:54:22 +08:00

17 lines
542 B
Markdown
Raw 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.

# split
> 把一个文件拆分成几块。
> 更多信息:<https://keith.github.io/xcode-man-pages/split.1.html>.
- 分割一个文件,每个分割部分有 10 行(除了最后一个):
`split -l 10 {{路径/到/文件}}`
- 用正则表达式拆分文件。匹配行将是下一个输出文件的第一行:
`split -p {{cat|^[dh]og}} {{路径/到/文件}}`
- 拆分一个文件,每个拆分中有 512 个字节(除了最后一个文件,使用 512K 表示 Kb512M 表示 Mb
`split -b 512 {{路径/到/文件}}`