{"id":312,"date":"2017-06-23T11:10:44","date_gmt":"2017-06-23T11:10:44","guid":{"rendered":"https:\/\/www.web-workers.ch\/?p=312"},"modified":"2017-09-01T19:58:03","modified_gmt":"2017-09-01T19:58:03","slug":"how-to-create-a-1gb-100mb-10mb-file-for-testing","status":"publish","type":"post","link":"https:\/\/www.web-workers.ch\/index.php\/2017\/06\/23\/how-to-create-a-1gb-100mb-10mb-file-for-testing\/","title":{"rendered":"How to create a 1GB, 100MB, 10MB file for testing"},"content":{"rendered":"<h2>On Linux<\/h2>\n<p>dd is the command from Linux that i use. To create 1 GB file go with<br \/>\n<code>dd if=\/dev\/zero of=testfile bs=1024 count=1024000<\/code><\/p>\n<p>to create 100 MB try<br \/>\n<code>dd if=\/dev\/zero of=testfile bs=1024 count=102400<\/code><\/p>\n<p>and for 10 MB use<code>dd if=\/dev\/zero of=testfile bs=1024 count=10240<\/code><\/p>\n<p>You can find on other forum that they use <em>\/dev\/urandom<\/em> or <em>\/dev\/random<\/em> however this are load intensive for your server and take longer to make the file.<\/p>\n<h2>On Windows<\/h2>\n<p>For example, this command will create a 1GB file called 1gb.test on my desktop:<\/p>\n<p><code>&gt; fsutil file createnew c:\\users\\steve\\desktop\\1gb.test 1073741824<\/code><\/p>\n<p>The key is to input the size of the file in bytes, so here are some common file sizes to save you from math:<\/p>\n<p>1 MB = 1048576 bytes<br \/>\n100 MB = 104857600 bytes<br \/>\n1 GB = 1073741824 bytes<br \/>\n10 GB = 10737418240 bytes<br \/>\n100 GB =107374182400 bytes<br \/>\n1 TB = 1099511627776 bytes<br \/>\n10 TB\u00a0=10995116277760 bytes<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On Linux dd is the command from Linux that i use. To create 1 GB file go with dd if=\/dev\/zero of=testfile bs=1024 count=1024000 to create 100 MB try dd if=\/dev\/zero [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":336,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,3],"tags":[63,46,29,28],"class_list":["post-312","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-mswin","tag-ad","tag-file","tag-server","tag-windows"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.web-workers.ch\/wp-content\/uploads\/2017\/06\/11.jpg?fit=852%2C480&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8sxjX-52","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/posts\/312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/comments?post=312"}],"version-history":[{"count":4,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/posts\/312\/revisions"}],"predecessor-version":[{"id":344,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/posts\/312\/revisions\/344"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/media\/336"}],"wp:attachment":[{"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/media?parent=312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/categories?post=312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/tags?post=312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}