truncate create a file of a specific size in Linux

Create a file of a specific size

Let us create the file 10M.txt with a size of 10 Mb

truncate -s 10M /usr/share/10M.txt

Article author: Andrei Olegovich