linux创建指定大小的文件
l本文介绍linux下创建指定大小文件的几种方法。
【truncate】
|
truncate -s 25M test.file |
【fallocate】
|
fallocate -l 25000000 test.file |
【dd】
|
dd if=/dev/urandom of=test.file bs=25MB count=1 |
|
dd if=/dev/zero of=test.file bs=25MB count=1 |
【head同上】
|
head -c 25MB /dev/urandon > test.file |
|
head -c 25M /dev/zero > test.file |

浙公网安备 33010602011771号