Files beginning with a .
are generally either directory references or involved in configuration/preferences.
On Unix-like systems .
refers to the current directory, and ..
refers to the previous (parent) directory. These two entries appear in every single directory.
Installed programs and system utilities (e.g. Steam, bash) also create directories and/or files in which they store user preferences and data. Users can spend a lot (a lot) of time tweaking their systems to work just the way they want it to, and config files contain those tweaks.
Unfortunately, there are a lot of programs and utilities on Unix-like systems, so there tend to be a lot of configuration files as well. For historic reasons, their locations are not centralised — they are scattered all over the place. The sheer number and distribution of config files makes directory listings look “messy” and makes it harder to find the file you are actually interested in. They often/usually act as clutter.
So, the developers of Unix — eons ago — came up with a convention of using a .
prefix in the filename itself to mark those useful (but rarely accessed) files, and utilities such as ls
ignore/hide them by default because, in all likelihood, “these are not the files you are looking for”.
tl;dr: Prefixing files with a .
to hide them is a quality-of-life convention that improves the signal:noise ratio of directory listings.
PS: If you are, instead, asking why your specific file was hidden, it’s because you instructed it to be hidden by using the -O option in your wget
command and giving it a filename which marked it as hidden. We can’t read your mind, so we don’t know why you deliberately used the -O option to rename the file. There is nothing special about your particular file. ALL files that have filenames starting with .
are hidden by default by utilities such as ls
.
PPS: If you didn’t devise/write that wget
command yourself, and merely copy-pasted it from somewhere else, then the only person on the planet who knows why renaming example.env
to .env
during download might be a good idea is the original author who wrote that wget
command. We know nothing about the software you are dealing with — what it does, where it goes, what files contain what or do what.