Tuesday, June 9, 2009

Creating a large empty file in Unix

To show off some disk monitoring software, I wanted to create a large file quickly to simulate a growth in disk usage.  I found this page, which reminded me to use the "dd" command:
Linux / Aix Administration - Tips & Stuff: Creating large empty files in Linux / UNIX

The command to create a 1 GB file is:
dd if=/dev/zero of=file_1GB bs=1024 count=1000000

No comments:

Post a Comment