Translate

Image of RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)
Image of Beginning Google Maps API 3
Image of Operating System Concepts
Image of Linux Kernel Development (3rd Edition)

Write all 1s to file using dd

It is easy to create a file consisting of all zeros in Linux using dd and the /dev/zero device. $ dd if=/dev/zero count=100 bs=1 > outfile So how do you create a file consisting of all binary ones? There is no device to create binary ones so you have to do something like the following: $ dd if=/dev/zero count=100 bs=1 | tr “00” “377” > outfile You can use xxd to see the contents of the resultant file: $ xxd -b outfile 0000000: 11111111 11111111 11111111 11111111 11111111 11111111 …… 0000006: 11111111 11111111 11111111 11111111 11111111 11111111 …… 000000c: 11111111