sudo echo "sadfsadf" > /etc/apache2/mods-available/dir.conf
I ran the command with sudo but it returned the error: "permission denied:
Why does this command not work?
sudo echo "sadfsadf" > /etc/apache2/mods-available/dir.conf
I ran the command with sudo but it returned the error: "permission denied:
Why does this command not work?
sudo xxx > file does not work as expected. xxx is executed as root, but the filewrite (>) is still 'executed' as the current user.
sudo -s and then execute the command with the pipe.