linux 快速生成大文件

快速生成大文件

命令一:

truncate -s 10G test4

命令二:

dd if=/home/sina.html of=/home/mms0.txt bs=1024 count=1

if的参数是输入文件是新浪的主页,

of的参数是要生成的文件,

bs的参数是每次读入的block大小,这里就设为要生成的文件大小,

count的参数是读取的block个数,这里就设为1。
原文地址:https://www.cnblogs.com/tomtellyou/p/12257554.html