अन्य जवाबों ने इसे पहले ही समझाया, लेकिन अगर आपको कोई संदेह है, तो आप देख सकते हैं कि क्या ddहोता है strace।
$ strace dd if=/dev/urandom bs=4096 seek=7 count=2 of=file_with_holes
# output is shortened considerably
open("/dev/urandom", O_RDONLY) = 0
open("file_with_holes", O_RDWR|O_CREAT, 0666) = 1
ftruncate(1, 28672) = 0
lseek(1, 28672, SEEK_CUR) = 28672
read(0, "\244\212\222v\25\342\346\226\237\211\23\252\303\360\201\346@\351\6c.HF$Umt\362;E\233\261"..., 4096) = 4096
write(1, "\244\212\222v\25\342\346\226\237\211\23\252\303\360\201\346@\351\6c.HF$Umt\362;E\233\261"..., 4096) = 4096
read(0, "~\212q\224\256\241\277\344V\204\204h\312\25pw9\34\270WM\267\274~\236\313|{\v\6i\22"..., 4096) = 4096
write(1, "~\212q\224\256\241\277\344V\204\204h\312\25pw9\34\270WM\267\274~\236\313|{\v\6i\22"..., 4096) = 4096
close(0) = 0
close(1) = 0
write(2, "2+0 records in\n2+0 records out\n", 312+0 records in
2+0 records out
) = 31
write(2, "8192 bytes (8.2 kB) copied", 268192 bytes (8.2 kB) copied) = 26
write(2, ", 0.00104527 s, 7.8 MB/s\n", 25, 0.00104527 s, 7.8 MB/s
) = 25
+++ exited with 0 +++
यह /dev/urandomपढ़ने ( if=/dev/urandom) के file_with_holesलिए खुलता है , बनाने / लिखने के लिए खुलता है ( of=file_with_holes)।
फिर यह = बाइट्स ( ) file_with_holesको काट देता है । ट्रंकट का अर्थ है कि उस स्थिति के खो जाने के बाद फ़ाइल सामग्री। ( इस कदम से बचने के लिए जोड़ें )। फिर यह बाइट्स करना चाहता है ।4096*728672bs=4096 seek=7conv=notrunc28672
फिर यह 4096बाइट्स ( bs=4096जैसा कि इस्तेमाल किया जाता है ibs) से /dev/urandom, 4096बाइट्स ( bs=4096जैसा कि obs) लिखता है file_with_holes, उसके बाद एक और रीड और राइट ( count=2) लिखता है ।
फिर यह बंद हो जाता है /dev/urandom, बंद हो जाता है file_with_holes, और प्रिंट करता है कि यह कॉपी 2*4096= 8192बाइट्स। अंत में यह त्रुटि के बिना बाहर निकलता है (0)।