Computing.Net > Forums > Unix > to create a file of specified size

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

to create a file of specified size

Reply to Message Icon

Name: u123
Date: September 29, 2004 at 05:04:19 Pacific
OS: unix
CPU/Ram: blank
Comment:

Could anybody help me to create an empty file of a specific size limit?..pls let me know what command has to be used for the same.

u123



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: September 29, 2004 at 07:32:16 Pacific
Reply:

Hi:

There's a little known device called /dev/zero which can quickly create a file of known size. This command:

dd if=/dev/zero of=myfile bs=1024 count=10

creates file "myfile" filled with zeros with a block size of 1000 muliplied 10 tens or 10K.

Regards,

Nails


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: to create a file of specified size

creating file of arbitrary size www.computing.net/answers/unix/creating-file-of-arbitrary-size/5322.html

Script to create a file listing www.computing.net/answers/unix/script-to-create-a-file-listing/5850.html

way to remove a file named -l ? www.computing.net/answers/unix/way-to-remove-a-file-named-l-/4071.html