Skip to content

Instantly share code, notes, and snippets.

@esctabcapslock
Created April 3, 2022 09:08
Show Gist options
  • Save esctabcapslock/aa5061b404debc9990970ac770cc223e to your computer and use it in GitHub Desktop.
Save esctabcapslock/aa5061b404debc9990970ac770cc223e to your computer and use it in GitHub Desktop.
의미없는 내용물로 가득찬 파일을 만들어 보아요 (초기화용)
const fs = require('fs')
function randfn(n){
const b = new Buffer.alloc(n)
for(let i=0;i<n;i++) b[i]=Math.random()*256&(-1)
return b;
}
for(let i=0; i<1024*10; i++) fs.appendFileSync('40.txt',randfn(1024*1024)) //1MB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment