Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

12
  • 1
    you might even get a boost with tr ... | tee - - - > /dev/disk but the likelihood that tr alone doesn't already meet and exceed the write bottleneck is pretty slim. Commented Aug 19, 2014 at 23:47
  • 1
    @mikeserv, I think the only way to increase performance from that is to reduce the number of system calls made. tee won't help for that. stdbuf -o1M tr... may help. Commented Aug 20, 2014 at 5:41
  • 4
    @mikeserv, actually, using tee - - - does increase throughput significantly in my testing. That's going from 800MiB/s for tr (950MiB/s with stdbuf) to 2.3GiB/s with tee, like you say in any case way above the rate any current drive can sustain. Commented Aug 20, 2014 at 6:01
  • 1
    sorry, how come you pass in '\0' '\377'? Is it necessary? Thanks! Commented Mar 19, 2020 at 12:33
  • 1
    @HCSF Those are the parameters to the tr command. tr translates characters - in this case \0 to \377 - both are octal numbers. /dev/null spews out constant \0 and tr is used to translate that stream into constant \377. 377 in octal is the same as 0xff in hexadecimal. Commented Apr 28, 2021 at 11:30