new hosts file question

A

alpha

just went to install a the hostfile listed on pricelessware and was
asked if i want to replace an already existing file by this name. The
new file is upper case "HOST" as apposed to the already existing lower
case "host"

can i rename the new downloaded "HOST" file without affecting it being
read???

cheers........A
 
B

badgolferman

just went to install a the hostfile listed on pricelessware and was
asked if i want to replace an already existing file by this name. The
new file is upper case "HOST" as apposed to the already existing lower
case "host"

can i rename the new downloaded "HOST" file without affecting it being
read???

cheers........A

If you are using Windows it doesn't care about the case. HOST is the
same as host. Are you sure it's not "hosts"?
 
J

Jim Byrd

Hi Alpha - Your HOSTS file should always be named this way - All Caps, no
extension.
 
M

Mel

Hi Alpha - Your HOSTS file should always be named this way - All Caps, no
extension.
HostsToggle makes turning the "Hosts" file "on" and "off" as easy as
clicking a button. The Hosts file can also be automatically restored
after a specified amount of time - great if you keep forgetting to turn
the Hosts back on! And finally, you can easily load alternate Hosts
files (saved with the extension .tgl) so that instead of completely
turning off the Hosts file, you can load one without the entries that
are causing you trouble.

http://www.accs-net.com/hosts/HostsToggle/
 
A

alpha

"Hi Alpha - Your HOSTS file should always be named this way - All Caps,
no
extension"

my main concern was that i would overwrite an already important hosts
file when i press the replace button. This is why i wanted to rename it
so i could still keep whatever is already existing. does the message
"replace existing file" only come up when there is an "IDENTICAL" file
or just a similler file.?

newbee question i know.

can i rename my downloaded file without disabling it from being read?

A

thanks......A
 
B

badgolferman

Jim said:
Hi Alpha - Your HOSTS file should always be named this way - All
Caps, no extension.

Why is this? Is this the only file that is that way?
 
Z

Zo

alpha said:
just went to install a the hostfile listed on pricelessware and was
asked if i want to replace an already existing file by this name. The
new file is upper case "HOST" as apposed to the already existing lower
case "host"

can i rename the new downloaded "HOST" file without affecting it being
read???

cheers........A

Hi alpha,

just remember that the "hosts" file has no extension, but the HOSTS file
has a .SAM extension (at least it does on my Win98SE system) and do
remember to back up or change the name of the existing "hosts" file to
something like "hosts-old" or something like that before you make the
change.

Zo
 
J

Joe Bloggs

Why is this? Is this the only file that is that way?

"All Caps" is nonsense - no version of Windows distinguishes between
upper and lower case in file names. It's true that it musn't have an
extension.
 
J

Jim Byrd

Hi Alpha - Do a little reading here:
http://www.mvps.org/winhelp2002/hosts.htm

Basically, on a basic system upon which no HOSTS file has been installed
you'll find in C:\WINNT\system32\drivers\etc (for XP/Win2k, other locations
for 98X) two sample files, hosts.sam and lmhosts.sam. These are meant to
give you a template for setting up your own HOSTS file. (lmhosts is only
pertinent if you're running a local network, BTW, and requires some
additional settings). DON'T replace or change these. If you add a HOSTS
file, then be aware that it can be used for two purposes.

First, you should understand that the original purpose of the HOSTS file
(BTW, it should always be named this way - all caps, no extension) was to
provide a local (therefore fast) translation from URLs to IP addresses for
frequently visited sites (typically your Favorites). It can still be used
this way (I do so, for example - there are utilities available such as CIP,
http://dl.winsite.com/bin/downl?500000007704 which will convert your
Favorites to IP's which you can then saveas to a .txt file and then copy
into your HOSTS file), but has also come to be used to block ad/malware
servers. See here for some good info about this use:
http://www.mvps.org/winhelp2002/hosts.htm This site also has downloads for
some utility programs which you will find useful if you decide to use a
HOSTS file such as RenHosts.bat,
http://www.mvps.org/winhelp2002/RenHosts.bat, and lockhosts.bat and
unlockhosts.bat, http://www.mvps.org/winhelp2002/lockhost.bat, and
http://www.mvps.org/winhelp2002/unlockhost.bat. The lock and unlock files
can be used to protect the HOSTS file in between UPDATES so that it doesn't
get hijacked by malware, while the rename hosts program will allow you to
easily enable or disable the HOSTS file (while keeping the correct naming
convention). An even better lock function is available in Zone Alarm's
firewall if you use that. As to size/performance - with any relatively
modern computer the delay added by the HOSTS lookup overhead should be
negligable for even moderately large HOSTS files (typically 250KB to 500KB)
used for ad/malware blocking. If you use it also for DNS-to-IP caching as I
refered to above, the time saved over going out to the net for DNS lookups
will offset this many times. If fact you may notice some speedup in
"normal" address browsing.

Perhaps this will help.
 
J

Jim Byrd

Hi Joe - Sorry, but that's not correct, at least not the part about all
caps. While XP per se may not distinguish between upper and lower case,
there's evidently code somewhere that does. While it may appear to work OK,
and will most of the time in some fashion when named lower case in W98x,
Win2k and XP, a good bit of experimentation has been done in these OS's
which shows that it will respond erratically upon occasion (blocking
incorrectly, translating IPs incorrectly, and/or freezing the browser) if
not named upper case. I (and some other MVPs who've looked at it) have never
been able to determine the specific cause, but that does appear to be the
case. (I found, for example, that I had to add a little .bat file
(HostsSuspend.bat) to reset the name to all caps after using HostsToggle in
order to get proper subsequent operation. I've since gone to RenHosts.bat,
http://www.mvps.org/winhelp2002/RenHosts.bat available with some other good
data about using HOSTS files for blocking malware here:
http://www.mvps.org/winhelp2002/hosts.htm) My guess at this point is that
it is probably an artifact due (perhaps indirectly) to legacy code from some
initial decision to make it compatible with "the format for host tables in
the 4.3 Berkeley Software Distribution (BSD) UNIX /etc/hosts file" and "This
file provides compatibility with the UNIX HOSTS file." as one MS document,
http://www.microsoft.com/resources/documentation/windows/98/all/reskit/en-us/part7/wrkappf.mspx
has it.


See here, for example:
http://support.microsoft.com/default.aspx?scid=kb;en-us;228760


"4. Save the HOSTS file.

NOTE: This file must be upper case, and should NOT have a file name
extension. In other words, the file name should simply be HOSTS."


YMMV, and, of course, you're free to choose to name it as you please.
 
J

Jim Byrd

Hi badgolferman - As to why, see my reply to Joe, below. AFAIK, it is the
only file that must be so treated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top