
F
59
fallocate fdisk
c
F
fallocate
CentOS
util-linux
Ubuntu
util-linux
Raspbian
util-linux
WSL
util-linux
書 式
fallocate [ オプション ] ファイル名
-l サイズ, --length サイズ ファイルサイズを指定する
ファイルサイズを指定してファイルを作成できます。一定サイズのダミーファイルが必
要な時に便利です
※1
。ファイルサイズはバイト数で指定します。単位はk/m/g またはkib/
mib/gib
(1024単位)、あるいはkb/mb/gb(1000 単位)が使えます(大文字でも小文字で
も可)。
実行例
50MiBと 50MB のファイルを作成する
$ fallocate -l 50m testfile_50m
$ fallocate -l 50mb testfile_50mb
$ ls -l testfile*
-rw-rw-r-- 1 north north 52428800 12
月 30 01:10 testfile_50m
-rw-rw-r-- 1 north north 50000000 12
月 30 01:10 testfile_50mb
関連コマンド
dd
fdisk
CentOS
util-linux
Ubuntu
util-linux
Raspbian
util-linux
書 式
fdisk [ ...