I’ve never done a “dot release” for any post in my Little Things Doth Crabby Make series but there is a first time for everything. In yesterday’s post (Part I) I blogged about how dd(1) on Linux will happily let you specify arbitrarily huge values for the bs (block size) option yet doing so will cause silent data loss. One reader commented on the blog and several emailed me to point out that the proof I specified is faulty. They are right, but that fact doesn’t change the truth. I discovered this data loss with a simple file-to-file dd operation but thought piping it to wc(1) would make the point easier to understand. The problem is doing so meant I was checking the return from wc(1) not dd(1). No matter:
# dd if=OH.tar.gz bs=2147483648 of=newfile count=1 0+1 records in 0+1 records out 2147479552 bytes (2.1 GB) copied, 3.57895 seconds, 600 MB/s # echo $? 0 # bc -l bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. 2147483648-2147479552 4096 # ls -l newfile -rw-r--r-- 1 root root 2147479552 Jun 17 12:06 newfile
0 Responses to “Little Things Doth Crabby Make – Part XII.1 Please, DD, Lose My Data! I Didn’t Need That Other 4K Anyway.”