|
2012-11-29
, 12:32
|
Posts: 1,680 |
Thanked: 3,685 times |
Joined on Jan 2011
|
#32
|
wget -O ~/hosts http://www.mvps.org/winhelp2002/hosts.txt && echo "127.0.0.1 RM696 localhost" > /etc/hosts && tr -d '\015' < ~/hosts >> /etc/hosts
echo "127.0.0.1" $(uname -n) "localhost"
The Following User Says Thank You to vi_ For This Useful Post: | ||
|
2012-11-29
, 12:43
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#33
|
~# wget -O ~/hosts http://www.mvps.org/winhelp2002/hosts.txt && echo "127.0.0.1" $(uname -n) "localhost" > /etc/hosts && tr -d '\015' < ~/hosts >> /etc/hosts
|
2013-02-18
, 08:00
|
Posts: 359 |
Thanked: 322 times |
Joined on Jun 2010
|
#34
|
|
2013-02-18
, 08:07
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#35
|
This works like a charm to speed up the browser! Are there any new host files to update with?
wget -O ~/hosts http://winhelp2002.mvps.org/hosts.txt && echo "127.0.0.1" $(uname -n) "localhost" > /etc/hosts && tr -d '\015' < ~/hosts >> /etc/hosts
|
2013-02-18
, 14:33
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#37
|
The Following User Says Thank You to thedead1440 For This Useful Post: | ||
|
2013-02-18
, 14:37
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#38
|
The one-liner reads your hostname and does the change accordingly so you don't need to do anything other than the one-liner...
|
2013-05-15
, 15:08
|
Posts: 11 |
Thanked: 6 times |
Joined on May 2012
|
#40
|
The download and transfer of file to /etc/hosts works but the $(cat /etc/hostname) didn't put RM696 into the hosts file...
See:
I had deleted the same hosts file that I already had prior to your post so its a fresh test...
Edit: Why not replace (cat /etc/hostname) with (uname -n)?
Edit 2: Replacing with (uname -n) in your command didn't do the change too; will check and report...
Last edited by thedead1440; 2012-11-29 at 12:30.