Buddha Buck ([info]blaisepascal) wrote in [info]madbodger,
dd can do it too.
blaisepascal@circumflex:~$ dd of=testfile if=/dev/zero bs=1k count=1 seek=1G
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.000105784 s, 9.7 MB/s
blaisepascal@circumflex:~$ ls -Flags testfile
16 -rw-r--r-- 1 blaisepascal 1099511628800 2009-06-25 00:52 testfile
blaisepascal@circumflex:~$ du testfile
16 testfile


The "seek=N" argument to dd makes it do a seek of N (obs) blocks before writing. In this case, that creates a holey file pretty quick. (I created a 1G file in 12s without the seek, and 0.004s with the seek.)



(Read 8 comments)

Post a comment in response:

From:
Help
Identity URL: 
Username:
Password:
Don't have an account? Create one now.
Subject:
No HTML allowed in subject
   Help
Message:

 
Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…