3 ms·
just for good measure: sudo echo -e "\n\n# Null route the Great Cannon:\n0.0.0.0 baidu.com\n0.0.0.0 qihucdn.com\n" | tee /etc/hosts ... but I know I'm only
by DyslexicAtheist 7y ago
just for good measure:
sudo echo -e "\n\n# Null route the Great Cannon:\n0.0.0.0 baidu.com\n0.0.0.0 qihucdn.com\n" | tee /etc/hosts
... but I know I'm only fooling myself.
- nothrabannosir 7y ago(I strongly recommend tee -a :) as well as putting the sudo before the tee).
- DyslexicAtheist 7y ago:) thanks (I admit didn't test it because I use `python3 ./updateHostsFile.py` to take care of /etc/hosts)
- iotku 7y agoNotable reason (for those unfamiliar) is that tee will overwrite the file unless given the -a argument which will append the input to the end of the file.