I've been given sudo access on one of our development RedHat linux boxes, and I seem to find myself quite often needing to redirect output to a location I don't normally have write access to.
(我已经在我们的开发RedHat linux机器上获得了sudo访问权限,而且我似乎经常发现自己需要将输出重定向到我通常没有写访问权限的位置。)
The trouble is, this contrived example doesn't work:
(麻烦的是,这个人为的例子不起作用:)
sudo ls -hal /root/ > /root/test.out
I just receive the response:
(我刚收到回复:)
-bash: /root/test.out: Permission denied
How can I get this to work?
(我该如何工作?)
ask by Jonathan translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…