• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Contact
  • Archives
  • Search

Create A Dummy File

February 4, 2019 by Ulysses

Here’s the command to create a dummy file in Linux. This creates a 1GB or a 2GB file. Adjust the count to achieve the file size.

# 1GB
dd if=/dev/zero of=/path/to/dummyfile bs=1M count=1024
# 2GB
dd if=/dev/zero of=/path/to/dummyfile bs=1M count=2048

# 1GB dd if=/dev/zero of=/path/to/dummyfile bs=1M count=1024 # 2GB dd if=/dev/zero of=/path/to/dummyfile bs=1M count=2048

Filed Under: Linux Tagged With: dd, dummy file

Search The Website

Subscribe Via Email

Copyright © 2022