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

20 lines
681 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.

# 切割
> 将一个文件分割成多个部分。
> 更多信息:<https://keith.github.io/xcode-man-pages/split.1.html>。
- 将一个文件分割每个分割包含10行最后一个分割除外
`split -l 10 {{path/to/file}}`
- 按正则表达式分割文件。匹配的行将成为下一个输出文件的第一行:
`split -p {{cat|^[dh]og}} {{path/to/file}}`
- 每个分割包含512字节最后一个分割除外使用512k表示千字节使用512m表示兆字节
`split -b 512 {{path/to/file}}`
- 将一个文件分割成5个文件。文件被分割成每个部分大小相同最后一个分割除外
`split -n 5 {{path/to/file}}`