Search This Blog

Tuesday, September 11, 2018

Redirect output of echo to root owned files

sudo and echo command does not work together if you have to redirect output of echo to root owned files you can execute

sudo sh -c "echo 'bar' > /etc/foo.conf"