How to rate-limit a pipe under linux ?

Posted by Frédéric Grosshans on Stack Overflow See other posts from Stack Overflow or by Frédéric Grosshans
Published on 2010-03-17T17:37:19Z Indexed on 2010/03/17 17:41 UTC
Read the original article Hit count: 562

Filed under:
|
|

Is there a filter which I could use to rate-limit a pipe on linux? If this exists, let call it rate-limit, I want to be able to type in a terminal something like

cat /dev/urandom | rate-limit 3 -k | foo

in order to send a a stream of random bytes to foo's standard input at a rate (lower than) 3 kbytes/s.

© Stack Overflow or respective owner

Related posts about pipe

Related posts about linux