生成指定大小的文件

生成1M大小的文件

dd

dd if=/dev/urandom of=onebox.test bs=1MB count=1

truncate

truncate -s 1M onebox.test

fallocate

fallocate -l 1000000 onebox.test

head/tail

head -c 1MB /dev/urandom > onebox.test
head -c 1MB /dev/zero > onebox.test

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章