I'm trying to fill binary file with all 1s.
As far I understand the problem '377' in octal representation should be 0xFF in hex.
tr(1) from /compat/linux seems to be working as expected:
Code:
dd if=/dev/zero bs=1M count=2 | /usr/bin/tr '\000' '\377' > file1 && hexdump file1
2+0 records in
2+0 records out
2097152 bytes transferred in 0.129117 secs (16242243 bytes/sec)
0000000 bfc3 bfc3 bfc3 bfc3 bfc3 bfc3 bfc3 bfc3
*
0400000
As far I understand the problem '377' in octal representation should be 0xFF in hex.
tr(1) from /compat/linux seems to be working as expected:
Code:
dd if=/dev/zero bs=1M count=2 | /usr/compat/linux/usr/bin/tr '\000' '\377' > file2 && hexdump file2
2+0 records in
2+0 records out
2097152 bytes transferred in 0.008285 secs (253130009 bytes/sec)
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
0200000