I often encouter this problem and it really bugs me on why it is so. So let's take this example into account :
[me@localhost:~]$ sudo command > /some/file.log
As far as I know, this will not work if the
user has no permission to write in
/some/file.log, even if the command is executed as
sudo. I found some workarounds on this website so that's not a problem, but I would like to know what is the reason behind it ? Why would the command be executed as
sudo, and the redirection as user ? Any solid reason to back this up ?