{"id":4548,"date":"2025-06-16T14:28:42","date_gmt":"2025-06-16T14:28:42","guid":{"rendered":"https:\/\/geekmungus.co.uk\/?p=4548"},"modified":"2025-06-21T18:09:20","modified_gmt":"2025-06-21T18:09:20","slug":"quick-dd-script-for-generating-files","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=4548","title":{"rendered":"Quick DD Script for Generating Files"},"content":{"rendered":"\n<p>Sometimes it can be useful to generate some files, so you can watch activity, I created this script for this use-case when performing storage updates, I can run this to generate some activity which is made visible to the screen so you can see if and when either expected or unexpected pauses take place. Its a simple BASH script you can run as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/check_script_dd_local.sh \/tmp\/ddtest<\/code><\/pre>\n\n\n\n<p>And the code is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n\n# Example Command: .\/check_script_dd_local.sh \/tmp\/ddtest\n# Runs the script and generates the random files within the \/tmp\/ddtest directory.\n\nlocal_path=$1\n\nwhile :\ndo\n        date\n\n        for n in {1..1000}; do\n          echo -n \"Creating a random file called random.img.\"$n\" in \"$local_path\".....\"\n          dd if=\/dev\/urandom of=$local_path\/random.img.$n count=10 bs=8K\n        echo \"Done!\"\ndone\n        sleep 1\n        echo \"Deleting the random files....\"\n        rm $local_path\/random.img.*\n\n        sleep 1\ndone<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes it can be useful to generate some files, so you can watch activity, I created this script for this use-case when performing storage updates, I can run this to generate some activity which is made visible to the screen so you can see if and when either expected or unexpected pauses take place. Its &#8230; <a title=\"Quick DD Script for Generating Files\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=4548\" aria-label=\"Read more about Quick DD Script for Generating Files\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":4282,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-4548","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-random"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4548"}],"version-history":[{"count":1,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4548\/revisions"}],"predecessor-version":[{"id":4549,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4548\/revisions\/4549"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/media\/4282"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}