linux下创建大文件

fallocate -l 10G bigfile
truncate -s 10G bigfile
dd of=bigfile bs=1 seek=10G count=0

文件系统对于这样创建的文件有特殊处理,叫稀疏文件,现在创建大文件光速了,再也不用纠结等半天了。

猜你喜欢

转载自www.cnblogs.com/pretty-ru/p/12189087.html
今日推荐