On this page you find all important commands for the CLI tool mkfile. If the
command you are looking for is missing please ask our AI.
mkfile
The mkfile command line tool is used to create a file with a specified size. It is primarily found on Unix-based operating systems.
- The
mkfilecommand is used to create a new file with a given size. - It is typically used for testing purposes or when a file of a specific size is needed.
- The command takes various options and arguments to define the size and name of the file to be created.
- One of the common options used with
mkfileis the-nflag, which specifies the size of the file in bytes. - The size can be specified by using numeric values followed by a multiplier like
k(kilobytes) orm(megabytes). - For example,
mkfile -n 1m testfilecreates a file named "testfile" with a size of 1 megabyte. - Another useful option is
-f, which forces the creation of the file even if it already exists. - By default,
mkfilecreates a file containing all null bytes, but you can specify a different content using the-ioption followed by a source file. mkfilealso supports creating sparse files, which are files that have unused space represented by zeros.- Overall, the
mkfilecommand line tool is a quick way to create files of a specific size, offering flexibility and control over file creation on Unix-based systems.
List of commands for mkfile:
-
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 machineexplain this command
-
mkfile:tldr:9999e mkfile: Create two files of 4 megabytes each.$ mkfile -n ${4m} ${first_filename} ${second_filename}try on your machineexplain this command
-
mkfile:tldr:ea363 mkfile: Create an empty file of 15 kilobytes.$ mkfile -n ${15k} ${filename}try on your machineexplain this command