LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mkfile

creates files of specified size

TLDR

Create file of size
$ mkfile [100m] [filename]
copy
Create sparse file
$ mkfile -n [1g] [filename]
copy
Create file in bytes
$ mkfile [1048576] [filename]
copy
Create multiple files
$ mkfile [10m] [file1] [file2]
copy
Verbose output
$ mkfile -v [100m] [filename]
copy

SYNOPSIS

mkfile [options] size file

DESCRIPTION

mkfile creates files of specified size. It can create empty files or sparse files.The tool is useful for testing and creating disk images. Sparse files don't allocate full space.

PARAMETERS

SIZE

File size (b, k, m, g suffixes).
FILE
Output filename.
-n
Create sparse file.
-v
Verbose output.
--help
Display help information.

CAVEATS

macOS/Solaris utility. Linux uses truncate/fallocate. Sparse file support varies.

HISTORY

mkfile originates from Solaris and is also available on macOS for creating files of arbitrary size.

SEE ALSO

truncate(1), fallocate(1), dd(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid