3 ms·
I don't think this will do what you think it will do. First, you'd want to echo, not cat, and second, the sudo won't affect the redirection, which is done by th
by cosarara97 11y ago
I don't think this will do what you think it will do. First, you'd want to echo, not cat, and second, the sudo won't affect the redirection, which is done by the shell.
- ytjohn 11y agoI use "tee" for these scenarios. echo "127.0.0.1 sourceforge.net" |sudo tee -a /etc/hosts