Skip to main content
Discard printf; tee may be used to double the throughput
Source Link

You can simulate a /dev/one without a special device, with a FIFO + printf (in a loop; slow) or yes (fast):

mkfifo ddfifo
dd if=ddfifo of=<file> iflag=fullblock bs=32K status=progress & while printfyes '\1';"" do| printftr '\1';'\n' done'\1' > ddfifo

Ortee may be used to double the throughput:

mkfifo ddfifo
dd if=ddfifo of=<file> iflag=fullblock bs=4M status=progress & yes "" | tr '\n' '\1' | tee ddfifo > ddfifo

If you'd like bytes with all bits set to one, swap '\1' for '\377'.

You can simulate a /dev/one without a special device, with a FIFO + printf (in a loop; slow) or yes (fast):

mkfifo ddfifo
dd if=ddfifo of=<file> iflag=fullblock bs=32K status=progress & while printf '\1'; do printf '\1'; done > ddfifo

Or:

mkfifo ddfifo
dd if=ddfifo of=<file> iflag=fullblock bs=4M status=progress & yes "" | tr '\n' '\1' > ddfifo

If you'd like bytes with all bits set to one, swap '\1' for '\377'.

You can simulate a /dev/one without a special device, with a FIFO + yes:

mkfifo ddfifo
dd if=ddfifo of=<file> iflag=fullblock bs=32K status=progress & yes "" | tr '\n' '\1' > ddfifo

tee may be used to double the throughput:

mkfifo ddfifo
dd if=ddfifo of=<file> iflag=fullblock bs=4M status=progress & yes "" | tr '\n' '\1' | tee ddfifo > ddfifo

If you'd like bytes with all bits set to one, swap '\1' for '\377'.

Source Link

You can simulate a /dev/one without a special device, with a FIFO + printf (in a loop; slow) or yes (fast):

mkfifo ddfifo
dd if=ddfifo of=<file> iflag=fullblock bs=32K status=progress & while printf '\1'; do printf '\1'; done > ddfifo

Or:

mkfifo ddfifo
dd if=ddfifo of=<file> iflag=fullblock bs=4M status=progress & yes "" | tr '\n' '\1' > ddfifo

If you'd like bytes with all bits set to one, swap '\1' for '\377'.