Of course there are a lot of ways users can create files when they use Macs, but sometimes it takes a terminal command to create a large, blank file, and it's really easy to create a large-capacity blank file in a Mac OS x system. Today we introduce two ways, the first is to use the terminal command line, the second is the use of disk tool application.
To create a bulk file using the terminal command line
The simplest command to quickly generate large-capacity blank files is mkfile, which is supported by both large and small files. Mkfile The format of the Mkfile command is this
Mkfile-n Size[b|k|m|g] File name
For example, if you want to create a 1GB capacity file named "Bulk test File" on your desktop, you only need to use the following command
Mkfile-n 1g ~/desktop/Large-capacity test file
However, there is a shortage of mkfile commands, because this command only supports Mac OS X, and if you want to create large-capacity blank files on other platforms, the DD command is more appropriate, and the DD command supports all UNIX and Linux systems. Using the DD command, we need to define the filename, block size, and chunk size:
DD If=/dev/zero of=filename bs=1024 count=1000
If you want to create a file with a capacity of 100MB, you need the following command.
DD If=/dev/zero of=largetestfile.img bs=1024 count=0 seek=$[1024*100]
Use disk tool to wear large blank files
1. Although users who want to use large-capacity blank files may prefer the terminal command line, disk utility applications can do the job well.
2. After opening the disk tool, click on the "file" drop-down menu in the upper left corner, select New, and select "Blank disk image".
3. Name the file that you want, and then choose the size you need in the size Drop-down menu, and click Create at the end.
These are the tips for Mac OS X systems to create large-capacity blank files through terminals or disk tools.