{"id":5930,"date":"2014-01-30T08:41:09","date_gmt":"2014-01-30T13:41:09","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/?p=5930"},"modified":"2014-01-30T08:41:09","modified_gmt":"2014-01-30T13:41:09","slug":"create-file-with-random-data-and-specific-size","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/","title":{"rendered":"Create file with random data and specific size"},"content":{"rendered":"<p>Here is a quick bash one liner to to create a file with random data and a specific file size<\/p>\n<p>This command will create a 2 MB file with random contents:<\/p>\n<p><code><br \/>\n$ dd if=\/dev\/urandom of=test.zip bs=1M count=2<br \/>\n2+0 records in<br \/>\n2+0 records out<br \/>\n2097152 bytes (2.1 MB) copied, 0.208422 s, 10.1 MB\/s<br \/>\n<\/code><\/p>\n<p>To view the file contents use:<br \/>\n<code><br \/>\nhexdump test.zip |less<\/p>\n<p>0000000 e209 6901 5e31 3747 7c24 4643 4c5f 74e7<br \/>\n0000010 8b99 fabb 74fa d3ed a5f1 90d9 e751 9ead<br \/>\n0000020 baea bec2 b0ca 5f2b 8719 8091 bb0e f82f<br \/>\n0000030 bf54 1c37 d764 a3bb 00c5 1871 ab6f 2c2b<br \/>\n0000040 b4d1 8e8e 1eeb ee19 8c58 31e0 58da 58d5<br \/>\n0000050 94d0 2141 c87e 5184 a722 594c 779a aa0a<br \/>\n0000060 01e4 ecaf a43c b5d8 1977 07cd de20 306f<br \/>\n0000070 13d3 1ef1 5d7d a482 e39b 086e 00f1 defd<br \/>\n0000080 8ec8 ed3d 2cb2 8f60 0da5 21e1 63df 21b0<br \/>\n0000090 a4b4 4617 c400 d9a5 694a 83bb 54d7 3874<br \/>\n00000a0 8b17 bc0c 9418 b287 a8e7 0475 be9c 9412<br \/>\n00000b0 548a a917 a577 b0f5 2806 9c8e 1728 5b9a<br \/>\n00000c0 a737 0fb7 070e dde9 b0fb a616 8133 0544<br \/>\n...<br \/>\n<\/code><\/p>\n<p>If running the command as root, you may want to chmod the file to 777 for access if using it as a test file to upload.<\/p>\n<p>Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a quick bash one liner to to create a file with random data and a specific file size This command will create a 2 MB file with random contents: $ dd if=\/dev\/urandom of=test.zip bs=1M count=2 2+0 records in 2+0 records out 2097152 bytes (2.1 MB) copied, 0.208422 s, 10.1 MB\/s To view the&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-5930","post","type-post","status-publish","format-standard","hentry","category-info"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create file with random data and specific size - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create file with random data and specific size - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"Here is a quick bash one liner to to create a file with random data and a specific file size This command will create a 2 MB file with random contents: $ dd if=\/dev\/urandom of=test.zip bs=1M count=2 2+0 records in 2+0 records out 2097152 bytes (2.1 MB) copied, 0.208422 s, 10.1 MB\/s To view the... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2014-01-30T13:41:09+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/create-file-with-random-data-and-specific-size\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/create-file-with-random-data-and-specific-size\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"Create file with random data and specific size\",\"datePublished\":\"2014-01-30T13:41:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/create-file-with-random-data-and-specific-size\\\/\"},\"wordCount\":70,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"General Info\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/create-file-with-random-data-and-specific-size\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/create-file-with-random-data-and-specific-size\\\/\",\"name\":\"Create file with random data and specific size - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2014-01-30T13:41:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/create-file-with-random-data-and-specific-size\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/create-file-with-random-data-and-specific-size\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/create-file-with-random-data-and-specific-size\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create file with random data and specific size\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create file with random data and specific size - Linux Shtuff","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/","og_locale":"en_US","og_type":"article","og_title":"Create file with random data and specific size - Linux Shtuff","og_description":"Here is a quick bash one liner to to create a file with random data and a specific file size This command will create a 2 MB file with random contents: $ dd if=\/dev\/urandom of=test.zip bs=1M count=2 2+0 records in 2+0 records out 2097152 bytes (2.1 MB) copied, 0.208422 s, 10.1 MB\/s To view the... Read More","og_url":"https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2014-01-30T13:41:09+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"Create file with random data and specific size","datePublished":"2014-01-30T13:41:09+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/"},"wordCount":70,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["General Info"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/","url":"https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/","name":"Create file with random data and specific size - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2014-01-30T13:41:09+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/create-file-with-random-data-and-specific-size\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"Create file with random data and specific size"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/5930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=5930"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/5930\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=5930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=5930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=5930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}