Create a large dummy file using Mac OS X terminal command


Create large dummy file using Terminal command
Create large dummy file using Terminal command

If you want to create a large dummy file with any extension e.g. : .txt, .dmg, .pdf, .mp4, .mov, .zip, .rar, .mk4 you can do it using mkfile command in Terminal App.

Steps to create a large file :

  1. Open Terminal App.
  2. Move to the location where you want to create your file using cd (change directory command)
  3. Now use command mkfile <size>G your-file-name.ext ( example: mkfile 4G mymovie.mov => will create a movie file with name mymovie of size 4GB)
  4. Hit Enter, It will take some time to complete the process (depends on the file size)
  5. When the command completes the prompt should return and file would be created.
  6. mkfile command also works on other Unix based or Linux Operating Systems.

  7. Comments:

    • Useful stuff! Thank you!!
      anon 08 Nov 2020 18:11:33 GMT
    • Further comments disabled!
Advertisements
Try Out Code2care Dev Tools:

Advertisements



Android Java Linux Microsoft Google Python macOS Notepad++ Microsoft Teams CSS PHP SharePoint Html Linux C Programs Bootstrap jQuery Sublime Android Studio Facebook Eclipse WhatsApp News MySQL Json HowTos JavaScript FTP S3


Advertisements


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR - https://donate.unhcr.org/in/en-in/ukraine-emergency