Create dummy file

dd if=/dev/zero of=filename.file bs=1024 count=10240
Command to create a dummy file (full of nulls). Useful for testing e.g. file transfers when no file is at hand. bs = blocksize, count = filesize in kilobytes

By: harpo
2012-01-19 08:38:14

What Others Think

Not a sparse file, just a file full of nulls. Sparse is done like so: dd of=<FILE> bs=1M seek=10 count=0 for a 10 meg file, etc.
h3xx · 456 weeks and 4 days ago
* check by comparing "ls -lah " and "du -h " after you make it. A 10mb sparse file reads 10k with du.
h3xx · 456 weeks and 4 days ago
harpo · 456 weeks and 4 days ago
totti · 456 weeks and 3 days ago
Count is in 'bs bytes' not kb. In this case in kb. I think this one is a duplicate.
totti · 456 weeks and 3 days ago
The blogging network is gigantic and wide, making it the ideal technique to stand up and talk about issues in which you are intrigued. Once visit for further info. One can share his perspectives about the particular policy driven issues, diversions, social conversations and information explicit to your instructive course.
anonymous11 · 3 weeks and 3 days ago
I am pleased to be an alum of the University of Oregon. Visit this for more info. This instructive foundation has given me such a great amount in my life. It has made my life.
anonymous11 · 3 weeks and 3 days ago
I tuned in to the excellent and resonant voice of Bollywood artist Armaan Malik in that melodic show. Once visit to get more details. His mystical voice keeps me engaged for an extremely long time frame.
anonymous11 · 3 weeks and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: