Possible Duplicates:
How to append to a file as sudo?
sudo unable to write to /etc/profile
The following command does not work because the elevated privileges do not apply to the redirection.
sudo echo "myoutput" >> /etc/file_that_only_root_can_write
how can it be done?