linux文件分割与合并-凯发app官方网站

凯发app官方网站-凯发k8官网下载客户端中心 | | 凯发app官方网站-凯发k8官网下载客户端中心
  • 博客访问: 3976758
  • 博文数量: 536
  • 博客积分: 10470
  • 博客等级: 上将
  • 技术积分: 4825
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-26 14:08
文章分类

全部博文(536)

文章存档

2024年(3)

2021年(1)

2019年(1)

2017年(1)

2016年(2)

2013年(2)

2012年(10)

2011年(43)

2010年(10)

2009年(17)

2008年(121)

2007年(252)

2006年(73)

相关博文
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·

分类: linux

2007-08-29 17:53:00

split - split a file into pieces

syntax

    split [-linecount | -l linecount ] [ -a suffixlength ] [file [name] ]
    split -b n [k | m] [ -a suffixlength ] [ file [name]]

-linecount | -l linecount  
    number of lines in each piece. defaults to 1000 lines.

-a suffixlength
    use suffixlength letters to form the suffix portion of the filenames of the split file.
    if -a is not specified, the default suffix length is 2. if the sum of the name operand and the suffixlength option-argument would create a filename exceeding name_max bytes, an error will result; split will exit with a diagnostic message and no files will be created.

-b n     split a file into pieces n bytes in size.
-b n k     split a file into pieces n*1024 bytes in size.
-b n m     split a file into pieces n*1048576 bytes in size.
file     the path name of the ordinary file to be split. if no input file is given or file is -, the standard input will be used.
name     the prefix to be used for each of the files resulting from the split operation. if no name argument is given, x will be used as the prefix of the output files. the combined length of the basename of prefix and suffixlength cannot exceed name_max bytes; see options.

examples
    $ split -b 22 newfile.txt new
        would split the file "newfile.txt" into three separate files called newaa, newab and newac each file the size of 22.

    $ split -l 300 file.txt new
        would split the file "newfile.txt" into files beginning with the name "new" each containing 300 lines of text each
        
合并:
    os linux:
        cat newaa newab newac > newfile.txt
    os windows:
        copy /b newaa /b newab /b newac newfile.txt /b

在linux下看文件合并后是否与原来一致:
    md5sum newfile.txt
    比较两次的md5号就可以了.
阅读(8244) | 评论(0) | 转发(0) |
0

上一篇:linux c 小测试

下一篇:cpu--基本概念

给主人留下些什么吧!~~
")); function link(t){ var href= $(t).attr('href'); href ="?url=" encodeuricomponent(location.href); $(t).attr('href',href); //setcookie("returnouturl", location.href, 60, "/"); }
网站地图