Easy Redirection of Sudo Output
Jul 06, 2010, 19:33 (1 Talkback[s])
(Other stories by Juliet Kemp)
WEBINAR:
On-Demand
How to Help Your Business Become an AI Early Adopter
"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
Related Stories:
- Get the Most Out of Bash History(Jun 22, 2010)
- Beyond Makefiles: GNU make is For More Than Just Compiling(Jun 15, 2010)
- Invoking Bash and Start-Up Files for Your Open Source Software Needs(Jun 15, 2010)
- Open Source Software Shortcut, Permanently Storing Macros in Vim(Jun 08, 2010)
- iPad meets Open Source With Help From WebDAV for Apache(Jun 02, 2010)
- Automation With Expect, an Open Source Software Utility(May 25, 2010)
- Email PDFs From the Command Line With Open Source Software uuencode(May 18, 2010)
- Ultra-minimal Linux Desktops Roundup(May 11, 2010)