Command to create a file of XMB

Post Reply
gautham
Posts: 14
Joined: Sun Jul 01, 2012 10:32 am

Command to create a file of XMB

Post by gautham »

How to create a file of 10MB.
dd if=/dev/zero of=testfile_10MB bs=10485760 count=1
du -sch testfile_10MB
Note : The size might get increased to 11MB
10485760 in the above exzmple is in Byte
2 MB -- > 2097152
5 MB --> 5242880
20 MB --> 20971520
50 MB --> 52428800
Gautham G
WebhostingDevelopment.com
a24uall
Site Admin
Posts: 166
Joined: Sun Jul 01, 2012 9:07 am

Re: Command to create a file of XMB

Post by a24uall »

Another useful command :
Create a 4MB file
seq 10 600000 >> file1.txt
Other examples are
seq 100 600000 >> file1.txt >>> 8MB
seq 1000 600000 >> file1.txt >>> 12MB
seq 10000 600000 >> file1.txt >>> 16MB
Arun
WebhostingDevelopment.com
Post Reply

Return to “Useful Commands”