DelphiFAQ Home Search:
General :: Linux :: shell
Linux shell programming/ scripting, shortcuts and general know-how.


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

Creating a big space holding file


How can I create a dummy file for test purposes in the unix shell?


This creates a file 'empty.dat' of size 1 MB (1024 blocks of 1024 bytes each), all zero:

dd if=/dev/zero of=empty.dat bs=1024 count=1024

This creates a file 'random.dat' of 2 MB (2048 blocks of 1 KB each), filled with random values:

dd if=/dev/random of=random.dat bs=1024 count=2048

Generated 20:00:37 on Aug 3, 2020