testing - intentionally corrupt a .Z file using 'dd'

天涯浪子 提交于 2019-12-06 15:08:24
that other guy

You could just have used a hex editor like hexedit.

Since you ask though,

dd if=/dev/urandom of=yourfile.z bs=1024 seek=$((RANDOM%10)) count=1 conv=notrunc

will rewrite garbage to a random 1024b block out of the first ten in a file.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!