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

-2
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 · 486 weeks ago
* check by comparing "ls -lah " and "du -h " after you make it. A 10mb sparse file reads 10k with du.
h3xx · 486 weeks ago
^^corrected
harpo · 486 weeks ago
totti · 485 weeks and 6 days ago
Count is in 'bs bytes' not kb. In this case in kb. I think this one is a duplicate.
totti · 485 weeks and 6 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 http://www.copyrightchecker.net/how-to-check-copyright-content-on-website-in-30-seconds/ 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 · 32 weeks and 6 days ago
I am pleased to be an alum of the University of Oregon. Visit this www.duplicatechecker.net/how-to-rewrite-plagiarism-and-not-to-be-busted/ for more info. This instructive foundation has given me such a great amount in my life. It has made my life.
anonymous11 · 32 weeks and 6 days ago
I tuned in to the excellent and resonant voice of Bollywood artist Armaan Malik in that melodic show. Once visit https://www.passivesentencechecker.com/6-persuasive-writing-techniques-with-active-or-passive-sentences-checker/ to get more details. His mystical voice keeps me engaged for an extremely long time frame.
anonymous11 · 32 weeks and 6 days ago
The particular number of schools and colleges must be checked prior to coexisting with any predefined online course. Once visit https://www.activevoicechecker.com/how-to-use-active-and-passive-voice-checker-app/ for more details. Every so often, a school is offering much better focal points when differentiated and various foundations.
Ahmed74 · 24 weeks and 3 days ago
Our religion urges us to learn new things. Visit www.pronounchecker.com/using-pronouns-correctly/" rel="nofollow">http://www.pronounchecker.com/using-pronouns-correctly/">www.pronounchecker.com/using-pronouns-correctly/ for more ideas. Direction is the essential wellspring of learning and investigating new things.
Ahmed74 · 24 weeks and 3 days ago
Our religion urges us to learn new things. Visit www.pronounchecker.com/using-pronouns-correctly/ for more ideas. Direction is the essential wellspring of learning and investigating new things.
Ahmed74 · 24 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?

commandlinefu.com 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.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

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: