开发者

Shift bytes of file in bash

开发者 https://www.devze.com 2023-04-06 11:45 出处:网络
How can I shift some bytes of a file in bash? What I want to do is make a file corrupt to check t开发者_开发问答hat my program will handle corrupt files correctly.

How can I shift some bytes of a file in bash? What I want to do is make a file corrupt to check t开发者_开发问答hat my program will handle corrupt files correctly.

Thanks!


To shift by, say, 3 bytes "left" and discard the shifted bytes:

$ tail -c +3 file > file.shifted
0

精彩评论

暂无评论...
验证码 换一张
取 消