Create multiple empty files #

The following examples create three empty files of 1MB each:

Unix:
$ for i in {1..3}; do dd if=/dev/zero of=/path/$i bs=1m count=1; done
or,
$ for i in {1..3}; do mkfile 1m /path/$i; done
Windows:
C:\>for /L %x in (1,1,3) do fsutil file createnew %x 1048576
Notes:

/nix | Nov 13, 2009


Subscribe or visit the archives.