{"id":572,"date":"2015-01-27T15:12:00","date_gmt":"2015-01-27T13:12:00","guid":{"rendered":"http:\/\/piprojects.net\/?p=572"},"modified":"2015-01-27T15:12:00","modified_gmt":"2015-01-27T13:12:00","slug":"code-snippet-fuer-dd","status":"publish","type":"post","link":"https:\/\/www.piprojects.net\/en\/code-snippet-fuer-dd\/","title":{"rendered":"Code Snippet f\u00fcr ddcode snippet for dd"},"content":{"rendered":"<p><\/p>\n<p><p>Today i have an little piece of code<br \/>\nI think , i&#8217;m not the only one who burn images on sd card from time to time, but it is strange no to know how long it takes to burn in.<br \/>\nFirst ok all you need a little extra tool : pv<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">apt-get install pv<\/pre>\n<p>Now copy &#038; paste this code to .bashrc<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">nano .bashrc\n\ndd()\n{\n    local dd=$(which dd); [ \"$dd\" ] || {\n        echo \"'dd' is not installed!\" &gt;&amp;2\n        return 1\n    }\n\n    local pv=$(which pv); [ \"$pv\" ] || {\n        echo \"'pv' is not installed!\" &gt;&amp;2\n        \"$dd\" \"$@\"\n        return $?\n    }\n\n    local arg arg2 infile\n    local -a args\n    for arg in \"$@\"\n    do\n        arg2=${arg#if=}\n        if [ \"$arg2\" != \"$arg\" ]\n        then\n            infile=$arg2\n        else\n            args[${#args[@]}]=$arg\n        fi\n    done\n\n    \"$pv\" -tpreb \"$infile\" | \"$dd\" \"${args[@]}\"\n}\n<\/pre>\n<p>Most time dd works only for root , so you have to put the same code in \/root\/.bashrc too<br \/>\nFound this code somewhere on stackexchange.com\n<\/p>\n<\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Today i have an little piece of code I think , i&#8217;m not the only one who burn images on sd card from time to time, but it is strange no to know how long it takes to burn in. First ok all you need a little extra tool : pv apt-get install pv Now [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_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},"jetpack_post_was_ever_published":false},"categories":[3],"tags":[],"class_list":["post-572","post","type-post","status-publish","format-standard","hentry","category-linux"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","wpmagazine_modules_lite_featured_media_urls":{"thumbnail":"","cvmm-medium":"","cvmm-medium-plus":"","cvmm-portrait":"","cvmm-medium-square":"","cvmm-large":"","cvmm-small":"","full":""},"categories_names":{"3":{"name":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"}},"tags_names":[],"comments_number":"0","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5ktuF-9e","jetpack-related-posts":[{"id":406,"url":"https:\/\/www.piprojects.net\/en\/bananapi-kernel-3-18-rc5\/","url_meta":{"origin":572,"position":0},"title":"BananaPi Kernel-3.18-rc5BananaPi Kernel-3.18-rc5","author":"Stefan","date":"Tuesday November 18th, 2014","format":false,"excerpt":"So nun hier alle meine Schritte f\u00fcr ein funktionierendes Debian Jessie mit Kernel-3.18 (auf die \u00c4nderungen im git werde ich hier nicht eingehen, aber man kann diese sich an im git selbst ansehen und nachverfolgen) Wer keine Lust auf basteln hat hier der Download Ich selbst setze derzeit ein LUbuntu\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":341,"url":"https:\/\/www.piprojects.net\/en\/banana-pi-kernel-3-18-rc-bauen\/","url_meta":{"origin":572,"position":1},"title":"(Deutsch) Banana Pi Kernel 3.18-rc bauen","author":"Stefan","date":"Wednesday November  5th, 2014","format":false,"excerpt":"Sorry, this entry is only available in Deutsch.Hier erstmal eine grobe Zusammenfassung der Schritte, eine genau Beschreibung folgt noch cat < 2048,524288,L 526336,,L EOT mkfs.vfat \/dev\/mmcblk0p1 mkfs.ext4 \/dev\/mmcblk0p2 apt-get install bc libncurses5-dev gcc-arm-gnueabihf u-boot-tools build-essential binutils-arm-linux-gnueabihf libusb-1.0-0 libusb-1.0-0-dev git wget fakeroot mkdir bpi cd bpi git clone -b sunxi-next https:\/\/github.com\/linux-sunxi\/linux-sunxi\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":561,"url":"https:\/\/www.piprojects.net\/en\/debian-jessie-mit-kernel-3-19-rc5\/","url_meta":{"origin":572,"position":2},"title":"Debian Jessie mit Kernel 3.19-rc5","author":"Stefan","date":"Sunday January 25th, 2015","format":false,"excerpt":"Heute ist es mal wieder soweit und ich habe ein neues Image. Einige kleinere Fehler die mir aufgefallen waren sind behoben und das Script: config ist per default nun auch enthalten. Weiterhin funktioniert das Image auf dem Pi und dem Pro gleicherma\u00dfen mit dem Unterschied das auch beim Pro das\u2026","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/www.piprojects.net\/en\/category\/allgemein\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1245,"url":"https:\/\/www.piprojects.net\/en\/debian-image-bauen\/","url_meta":{"origin":572,"position":3},"title":"(Deutsch) Debian Image bauen","author":"Stefan","date":"Thursday January  5th, 2017","format":false,"excerpt":"Sorry, this entry is only available in Deutsch.Ich habe mal mein \"altes\" Script \u00fcberarbeitet zum erstellen von einem Debian Image. Die git Quellen sollte man entsprechend anpassen , da sie derzeit auf meine Testing zeigen und noch nicht alles funktioniert (jedenfalls M2 Ultra) der Rest sind aktuelle Quellen darin. Verzeichnis\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.piprojects.net\/wp-content\/uploads\/2015\/01\/bin-bash-extended.sh-600x600-260x260.png?fit=260%2C260&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":276,"url":"https:\/\/www.piprojects.net\/en\/raspberrypi-und-raspbmc\/","url_meta":{"origin":572,"position":4},"title":"RaspberryPi und RaspbmcRaspberryPi und Raspbmc","author":"Stefan","date":"Thursday February 28th, 2013","format":false,"excerpt":"Hallo nach etwas l\u00e4ngerem mal wieder :) Ich habe mir zu Weihnachten mal ein kleines Spielzeug gekauft. Wie die \u00dcberschrift schon sagt einen Raspberry. Diesen betreibe ich bei mir mir raspbmc. http:\/\/www.raspbmc.com\/download\/ Raspbmc ist ein MediaCenter auf Basis von XBMC welches es f\u00fcr XBOX , Windows und Linux gibt. Klar\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":759,"url":"https:\/\/www.piprojects.net\/en\/centos-7-auf-dem-banana-oder-raspberry-3\/","url_meta":{"origin":572,"position":5},"title":"(Deutsch) CentOS 7 auf dem Banana oder Raspberry 3","author":"Stefan","date":"Monday May  2nd, 2016","format":false,"excerpt":"Sorry, this entry is only available in Deutsch.Ich habe es endlich geschafft mal wieder etwas mit dem Banana und auch dem Raspi3 zu spielen und habe dabei CentOS 7 gefunden. http:\/\/buildlogs.centos.org\/centos\/7\/isos\/armhfp\/ Die Installation ist denkbar einfach. Image Laden und mit dd \u00a0oder WinImager auf die SD Karte schreiben. Das System\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/posts\/572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/comments?post=572"}],"version-history":[{"count":0,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/posts\/572\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/media?parent=572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/categories?post=572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/tags?post=572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}