Computing.Net > Forums > Linux > Creating empty file

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.

Creating empty file

Reply to Message Icon

Name: Bruno
Date: November 3, 2005 at 00:54:18 Pacific
OS: Windows XP SP2 / Fedora C
CPU/Ram: 2.4 GHz / 2 GB
Comment:

Is there any way to create an 150 MB empty file so that when I send it over Internet, it is sent really fast as though the real size was 0 MB??

Thank's!



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: November 3, 2005 at 10:42:39 Pacific
Reply:

I don't know what you are asking.

An empty file, by definition, is zero length - there is nothing in it.

A file that is 150 MB is NOT, by definition, empty.



0

Response Number 2
Name: Jake2
Date: November 4, 2005 at 00:02:52 Pacific
Reply:

You can create 150Mb of 0s and compress it on the fly down to 145 bytes with:

dd if=/dev/zero bs=1M count=150 | bzip2 -c > 150mb.bz2


0

Sponsored Link
Ads by Google
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 Linux Forum Home


Sponsored links

Ads by Google


Results for: Creating empty file

how to create a file in graphical www.computing.net/answers/linux/how-to-create-a-file-in-graphical/23740.html

Create Unix file on Windows www.computing.net/answers/linux/create-unix-file-on-windows/22778.html

Creating a .tar.gz file www.computing.net/answers/linux/creating-a-targz-file/18025.html