You are not logged in.
Pages: 1
I'd like to use echo to add line to foobar with sudo since foobar is owned by root.
$ sudo echo "new line" >>foobar
bash: foobar: Permission denied
Where is the error in my thinking?
EDIT: headsmack... the redirect is not running elevated.
$ sudo sh -c "echo 'new line' >>foobar"
Last edited by graysky (2012-05-22 00:53:44)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Pages: 1