Monday, November 3, 2014

Quickly Make A Large File In Ubuntu

If you want to create a 10 GB File, follow the steps below listed
root@ubuntu:~# time dd if=/dev/zero of=large bs=10G count=1
dd: memory exhausted by input buffer of size 10737418240 bytes (10 GiB)
real    0m0.002s
user    0m0.000s
sys     0m0.000s
root@ubuntu:~# du -B 1 --apparent-size large
0       large
root@ubuntu:~# du -B 1 large
0       large
root@ubuntu:~# time fallocate -l 10G large
real    0m0.091s
user    0m0.000s
sys     0m0.008s

No comments:

Post a Comment

bloggerwidgets