---

Easy Redirection of Sudo Output

“If you’re using Sudo, you’ve probably already discovered that
the increased privileges apply only to the first command typed and
don’t extend to any input or output redirection. For example:

sudo iptables -L > /etc/iptables

“will give you a ‘Permission denied’ error because the shell
interprets the first command (with sudo), then pipes it into the
second command (without sudo).”


Complete Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis