[Gllug] sudo and more interesting commands
stig at brautaset.org
Fri Jul 2 11:39:31 UTC 2004
On Fri, Jul 02, 2004 at 12:33:01PM +0100, Tom Taylor wrote:
> $ sudo echo foo > bar
> but that wouldn't work as only echo is being run as root, nor can I use
> a sub shell ... what can I do to sudo a command that is more complicated
> that <command> [args]??
% sudo sh -c "echo foo > bar"
would do, but I guess that is disqualified by using a subshell?
Gllug mailing list - Gllug at gllug.org.uk
More information about the GLLUG