{"id":68,"date":"2013-09-26T13:26:04","date_gmt":"2013-09-26T13:26:04","guid":{"rendered":"http:\/\/muse.oneshot.in\/?p=68"},"modified":"2013-09-26T13:27:36","modified_gmt":"2013-09-26T13:27:36","slug":"create-file-of-a-given-size-using-dd-command","status":"publish","type":"post","link":"https:\/\/muse.oneshot.in\/?p=68","title":{"rendered":"Create File of a Given Size using dd command"},"content":{"rendered":"<p>To create any file of given size in linux we can use dd command<\/p>\n<p>Task is to create a file of size 10M<\/p>\n<pre>dd if=\/dev\/zero of=aa.txtt  bs=1024  count=10240\r\n10240+0 records in\r\n10240+0 records out\r\n10485760 bytes (10 MB) copied, 0.218581 seconds, 48.0 MB\/s\r\n$ ls -hl output.dat\r\n-rw-r--r-- 1 raju raju 10M 2008-02-09 16:21 aa.txt\r\n\r\nThe above dd command creates a zero-filled file named aa.txt consisting of a count of 10240 blocks, each of block size 1024.\r\nor you can use the below command which is more clear<\/pre>\n<pre>$ dd if=\/dev\/zero of=aa.txt  bs=1M  count=10<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To create any file of given size in linux we can use dd command Task is to create a file of size 10M dd if=\/dev\/zero of=aa.txtt bs=1024 count=10240 10240+0 records in 10240+0 records out 10485760 bytes (10 MB) copied, 0.218581 seconds, 48.0 MB\/s $ ls -hl output.dat -rw-r&#8211;r&#8211; 1 raju raju 10M 2008-02-09 16:21 aa.txt [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-information-technology","category-redhat"],"_links":{"self":[{"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=68"}],"version-history":[{"count":2,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":70,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions\/70"}],"wp:attachment":[{"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}