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 deniedWhere 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)
Offline
Pages: 1