Code Monkey home page Code Monkey logo

file-splitter's Introduction

file-splitter

English ReadMe

介绍

文件分割器, 可将大文件分割为多个小文件, 支持自定义分割大小等参数.

安装教程

  1. 首先确保安装JDK8, MAVEN
  2. 克隆本代码, 然后在项目根目录命令行下执行mvn package打包, 在target下生成file-splitter-jar-with-dependencies.jar即可.

使用说明

  1. 假设要将D:\tmp\bigfile.txt文件分割到D:\tmp\output文件夹下, 需执行如下命令:
    java -jar target/file-splitter-jar-with-dependencies.jar -s D:\tmp\bigfile.txt -d D:\tmp\output
    -s 即源文件
    -d 即目的文件夹, 切割后的文件会生成在这个下面
    以上2项为必填项.

  2. 为了方便使用, 本工具还支持以下参数(可选):
    -allowEmptyLine 默认会忽略空行,此选项会将空行写入到目的文件
    -fileIndex <arg> 文件命名起始索引(数字),默认从1开始命名
    -notClearDirAtFirst 执行前不要清空目的文件夹,默认会清空目的文件夹
    -splitSize <arg> 切割大小,默认字节,支持k,m,g,默认50M
    -suffix <arg> 切割后的文件后缀,默认是取的源文件的后缀

  3. 可通过API方式调用.

Maven坐标:

<dependency>
	<groupId>com.github.someja</groupId>
	<artifactId>file-splitter</artifactId>
	<version>0.0.1</version>
</dependency>	

联系方式

有问题可联系: [email protected]

file-splitter's People

Contributors

someja avatar

Watchers

 avatar

Forkers

help-lixin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.