Code Monkey home page Code Monkey logo

axe's Introduction

axe

Personal useful tool for dev.

tools

fake_file

fake_file_gen.sh

Generate fake files for mock. Using

dd if=/dev/urandom of=randomfile01.bin bs=10M count=1000
script usage:  -nfbcr
      -f    filename_prefix
      -n    file num
      -b    blocksize
      -c    blockcount
      -r    random_blockcount_range
      -s    file_suffix
            
      final_blockcount : blockcount +- random_blockcount_range/2
      
      example ./fake_file_gen.sh -f file -n 100 -b 1k -c 100 -r 10 -s .mp4

result

➜  ./fake_file_gen.sh -f file -n 100 -b 1k -c 100 -r 10 -s .mp4

➜  ls -l                                                       
total 20448
-rwxrwxrwx  1 levi.zhou  staff    1522 Jan 17 18:24 fake_file_gen.sh
-rw-r--r--  1 levi.zhou  staff  102400 Jan 17 18:34 file-0-29249.mp4
-rw-r--r--  1 levi.zhou  staff   98304 Jan 17 18:34 file-1-16031.mp4
-rw-r--r--  1 levi.zhou  staff  104448 Jan 17 18:34 file-10-13371.mp4
-rw-r--r--  1 levi.zhou  staff  107520 Jan 17 18:34 file-11-27211.mp4
-rw-r--r--  1 levi.zhou  staff  103424 Jan 17 18:34 file-12-10860.mp4
......

axe's People

Contributors

sptuan 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.