Coder Social home page Coder Social logo

az82 / dirslicer Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 8 KB

dirslicer is a small command line utility that is able to slices and re-slice directories into slices with a given size.

License: MIT License

Go 92.40% Makefile 7.60%
cli go utility

dirslicer's Introduction

dirslicer

dirslicer is a small command line utility that is able to slices and re-slice directories into slices with a given size. It can process directories with a very large number of files, flat or divided into sub-directories. The only condition is that the file names fit into memory.

Given a directory ./source with the files a,b,c,d,e,

dirslice --size 3 ./source ./target

will move the files to this structure in ./target:

 a-c/ a,b,c
 d-e/ d,e

Usage

Usage: dirslice SOURCE TARGET
  SOURCE must be a directory
  TARGET must either be an empty directory or a new location

  -help
        Show help
  -size int
        Number of files per directory (default 1024)

Build

Run The Tests

make test

Build An Executable For The Current Platform

make build

After that, the directory ./bin will contain the executable for the current platform.

Build Distributions for all supported platforms

Provide the desired version with the environment variable VERSION.

VERSION=1.2.3 make dist

If version is not specified, the git tag, git branch or commit ID will be used.

Clean Build Results

make clean

License

Copyright (c) 2022 Andreas Zitzelsberger

This software can be under the terms and conditions of the MIT License (MIT).

dirslicer's People

Contributors

az82 avatar

Watchers

 avatar

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.