[mythtv-users] How do I use sudo to write to a root-owned file?
Johnny
jarpublic at gmail.com
Sun Oct 11 22:17:36 UTC 2009
> You can accomplish this by echoing the values and piping the output of
> the echo into a "sudo tee" command:
>
> echo "values" | sudo tee /sys/class/rtc/rtc0/wakealarm > /dev/null
>
> Thank the Wikipedia page for 'tee' (
> http://en.wikipedia.org/wiki/Tee_(command) )
Wouldn't the script still need to be run with sudo access otherwise
the sudo command will prompt for a password and wouldn't really work
in automated way.
More information about the mythtv-users
mailing list