Forrest logo
back to the mkfile tool

mkfile:tldr:829d9

mkfile: Create a file of a given size and unit (bytes, KB, MB, GB).
$ mkfile -n ${size}${select} ${filename}
try on your machine

The command "mkfile -n ${size}${select} ${filename}" creates a file with the specified name, size, and content.

Here is a breakdown of the command:

  • "mkfile" is the command to create a file.
  • "-n" is an option that specifies that the file should not be filled with data.
  • "${size}${select}" is a placeholder for the size and selection values that you need to specify based on your requirements.
    • "size" represents the size of the file you want to create. For example, "10M" represents a file size of 10 megabytes.
    • "select" is used to choose the unit for the size. Some common options are:
      • "b" for bytes
      • "k" for kilobytes
      • "M" for megabytes
      • "G" for gigabytes
      • "T" for terabytes
    • You need to replace "${size}${select}" with the actual size and selection values you want to use when executing the command.
  • "${filename}" is a placeholder for the desired filename. You need to replace it with the name you want to give to the file when executing the command.
This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mkfile tool