hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : How to create an large empty file on unix? (like with touch -size 4GB)
Reply

Forum Jump

How to create an large empty file on unix? (like with touch -size 4GB)

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 12-17-2004, 02:08 PM
runningaround runningaround is offline
Newbie
 
Join Date: Nov 2004
Posts: 10

How to create an large empty file on unix? (like with touch -size 4GB)


Hi,
I need to take up space (4gigs) on purpose for testing purposes and would like to create a large (empty) file. I would like to know if there is a simple command that exists to do this (like "touch")?

I don't want to have to resort to copying a large file over the network, tarring a large dir, catting files, or any type of script to create a large file.

Any ideas?

Puzzled


Last edited by runningaround; 12-17-2004 at 02:16 PM.


Sponsored Links
  #2  
Old 12-17-2004, 02:34 PM
bitserve bitserve is offline
Web Hosting Master
 
Join Date: Nov 2001
Location: Ann Arbor, MI
Posts: 2,978
man dd

or

dd if=/dev/zero of=/path/to/file count=123456

__________________
-Mark Adams
www.bitserve.com - Secure Michigan web hosting for your business.
Only host still offering a full money back uptime guarantee and prorated refunds.
Offering advanced server management and security incident response!

  #3  
Old 12-17-2004, 02:40 PM
runningaround runningaround is offline
Newbie
 
Join Date: Nov 2004
Posts: 10
dd works. Thanks

Thank you! That does work! apparently prealloc filename 2100000 also works but I don't have prealloc. Thanks again!

Sponsored Links
  #4  
Old 12-17-2004, 11:25 PM
bitserve bitserve is offline
Web Hosting Master
 
Join Date: Nov 2001
Location: Ann Arbor, MI
Posts: 2,978
Great! Glad it worked for you.

__________________
-Mark Adams
www.bitserve.com - Secure Michigan web hosting for your business.
Only host still offering a full money back uptime guarantee and prorated refunds.
Offering advanced server management and security incident response!

Reply

Related posts from TheWhir.com
Title Type Date Posted
Egnyte Launches Program to PRISM-Proof Enterprise Cloud File-sharing Web Hosting News 2013-09-27 13:45:48
Box Doubles Storage for Free Plan, Launches $5 Enterprise Plan Web Hosting News 2013-08-22 13:32:27
Bit Refinery Launches Hadoop Hosting Service Web Hosting News 2013-07-17 15:23:50
Mega Firefox Extension Speeds Up Downloads, Removes File Size Limits Web Hosting News 2013-02-11 11:43:22
Dell Quietly Taps Nirvanix for New Cloud Storage Service Web Hosting News 2012-09-12 17:37:30


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?