[clug] Command of the Hour

Jeremy Kerr jk at ozlabs.org
Tue Sep 16 01:06:11 GMT 2008


> And sudo tee
> Because `sudo echo foo > file` won't work when you don't have
> permission to change file, the shell does the redirection.
> `echo foo | sudo tee file` will work for you.

I use dd for this:

echo 1 | sudo dd of=/proc/sys/net/ipv4/ip_forward

- which gives you the same semantics as bash redirection (ie, the output 
isn't copied to stdout)

Cheers,


Jeremy




More information about the linux mailing list