From 46531b95754c8fc41a6b988734b8f925845bec40 Mon Sep 17 00:00:00 2001 From: "ithink.chan" Date: Tue, 27 Aug 2019 11:06:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=88=87=E5=88=86=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=92=8C=E5=90=88=E5=B9=B6=E6=96=87=E4=BB=B6=E6=8C=87?= =?UTF-8?q?=E4=BB=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ithink.chan --- Software/Application/Cat/Cat_合并文件.md | 9 ++++++ Software/Application/Split/Split_切分文件.md | 31 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 Software/Application/Cat/Cat_合并文件.md create mode 100644 Software/Application/Split/Split_切分文件.md diff --git a/Software/Application/Cat/Cat_合并文件.md b/Software/Application/Cat/Cat_合并文件.md new file mode 100644 index 0000000..ac67107 --- /dev/null +++ b/Software/Application/Cat/Cat_合并文件.md @@ -0,0 +1,9 @@ +# Cat 合并文件 + +```sh +cat > +# 或者 +cat * > +``` + +切分文件方法参见 [《Split 切分文件》](../Split/Split_切分文件.md) diff --git a/Software/Application/Split/Split_切分文件.md b/Software/Application/Split/Split_切分文件.md new file mode 100644 index 0000000..f4e7bfb --- /dev/null +++ b/Software/Application/Split/Split_切分文件.md @@ -0,0 +1,31 @@ +# Split 切分文件 + +当面临将一个大文件进行切分时,linux 的 split 命令是很好的选择。它包含多种参数,支持按行、大小进行切分。 + +split 命令的语法如下: + +```sh +split [--help][--version][-a ][-b][-C ][-d][-l ] +``` + +## 按行数分割 + +```sh +split -l 300 +``` + +加上 -d,使用数字后缀;加上 --verbose,显示分割进度: + +```sh +split --verbose -l50000 -d +``` + +## 按字节大小分割 + +```sh +split -b 10m +``` + +## 合并文件 + +参见 [《Cat 合并文件》](../Cat/Cat_合并文件.md)