{"id":98,"date":"2003-11-04T16:34:12","date_gmt":"2003-11-04T15:34:12","guid":{"rendered":"http:\/\/wp.devco.net\/?p=98"},"modified":"2009-10-09T17:32:50","modified_gmt":"2009-10-09T16:32:50","slug":"linux_it_just_does_not_add_up","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2003\/11\/04\/linux_it_just_does_not_add_up.php","title":{"rendered":"Linux, it just does not add up!"},"content":{"rendered":"

Today I noticed something very strange on a few Linux machines.
\nI needed a 10 Mb file to do some bandwidth tests, I would just put it on a web server and download it often. I used dd to create a file that I thought was 10Mb and checked it with du -h:<\/p>\n

\n
# dd if=\/dev\/urandom of=10megfile.dat bs=1024 count=10240\n# ls -l 10megfile.dat\n-rw-r--r--    1 root     root     10485760 nov  4 16:38 10megfile.dat\n# du -h 10megfile.dat\n11M     10megfile.dat<\/pre>\n<\/blockquote>\n

So I thought I am going mad since surely du cannot be wrong, I checked with the Google Calculator<\/a> and it agrees, 10 485 760 bytes does make 10 Mb.
\nI then checked the same on
FreeBSD<\/a> and it finds it as 10Mb, RedHat 6.2 agrees it is 10Mb but RedHat 7.2 and a number of Mandrake machines thinks it is 11Mb.
\nI guess I need to have a chat with bug-fileutils@gnu.org<\/p>\n","protected":false},"excerpt":{"rendered":"

Today I noticed something very strange on a few Linux machines. I needed a 10 Mb file to do some bandwidth tests, I would just put it on a web server and download it often. I used dd to create a file that I thought was 10Mb and checked it with du -h: # dd […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","footnotes":""},"categories":[6],"tags":[39,19],"_links":{"self":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/98"}],"collection":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/comments?post=98"}],"version-history":[{"count":1,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/98\/revisions"}],"predecessor-version":[{"id":901,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/98\/revisions\/901"}],"wp:attachment":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/media?parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/categories?post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/tags?post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}