每天回顾linux命令(split)
2017-10-30 23:25
369 查看
split命令
split命令可以将一个大文件分割成很多个小文件,有时需要将文件分割成更小的片段,比如提高可读性,生成日志等。
选项
-a:表名文件后缀的大小,默认为2
-b:为每个文件档案的大小,单位为字节。
-c:每一输出档中,单行的最大byte数
-d:使用数字作为后缀,如-b例子,没加-d如下:
-l:没一输出档的列数大小。以行数分割文件。
split命令可以将一个大文件分割成很多个小文件,有时需要将文件分割成更小的片段,比如提高可读性,生成日志等。
选项
-a:表名文件后缀的大小,默认为2
root@62bf1a913608:/home/wzm/testsplit# ll redis.conf -rw-r--r-- 1 root root 57764 Oct 30 15:14 redis.conf root@62bf1a913608:/home/wzm/testsplit# ls redis.conf root@62bf1a913608:/home/wzm/testsplit# split -b10240 redis.conf -d -a 10 redis.conf root@62bf1a913608:/home/wzm/testsplit# ls redis.conf redis.conf0000000001 redis.conf0000000003 redis.conf0000000005 redis.conf0000000000 redis.conf0000000002 redis.conf0000000004
-b:为每个文件档案的大小,单位为字节。
root@62bf1a913608:/home/wzm/testsplit# ll redis.conf -rw-r--r-- 1 root root 57764 Oct 30 15:14 redis.conf root@62bf1a913608:/home/wzm/testsplit# split -d -b10240 redis.conf root@62bf1a913608:/home/wzm/testsplit# ls redis.conf x00 x01 x02 x03 x04 x05
-c:每一输出档中,单行的最大byte数
-d:使用数字作为后缀,如-b例子,没加-d如下:
root@62bf1a913608:/home/wzm/testsplit# ll redis.conf -rw-r--r-- 1 root root 57764 Oct 30 15:14 redis.conf root@62bf1a913608:/home/wzm/testsplit# split -b10240 redis.conf root@62bf1a913608:/home/wzm/testsplit# ls redis.conf xaa xab xac xad xae xaf
-l:没一输出档的列数大小。以行数分割文件。
相关文章推荐
- 每天回顾linux命令(last)
- 每天回顾linux命令(cd)
- 每天回顾linux命令(tr)
- 每天回顾linux命令(chgrp)
- 每天回顾linux命令(users)
- 每天回顾linux命令(touch)
- 每天回顾linux命令(chown)
- 每天回顾linux命令(mkdir)
- 每天学点Linux-切割命令split
- 每天回顾linux命令(zip)
- 每天回顾linux命令(unzip)
- 每天回顾linux命令(umask)
- 每天回顾linux命令(df)
- 每天回顾linux命令(reboot)
- 每天回顾linux命令(stat)
- 每天回顾linux命令(chmod)
- 每天回顾linux命令(mv)
- 每天回顾linux命令(date)
- 每天回顾linux命令(su)
- 每天回顾linux命令(id)