logoalt Hacker News

thaynetoday at 5:49 AM1 replyview on HN

Or

    echo $NUM_PAGES | sudo tee /proc/sys/vm/nr_hugepages 

I've always found it odd that there isn't a standard command to write stdin to a file that doesn't also write it to stdout. Or that tee doesn't have an option to supress writing to stdout.

Replies

axiolitetoday at 6:00 AM

You forgot the "sudo" before "tee"

> write stdin to a file that doesn't also write it to stdout

You mean like "dd of=/path/file" ?