What are DOT-files?

What are dot-files?

  • I am having a hard time grasping what dot-files are or what they are for. Are they directories? How do I navigate to them? Thank you!

  • Answer:

    In Unix/Linux dot-files refers to files/directories with a "." appended to their name. Examples are ~/.bashrc ~/.bash_profile etc. The leading dot (.) is used as an indicator by softwares like bash and nautilus to not list these files normally but only when they are specifically requested like pressing Ctrl+H in Nautilus. This is because, generally, dot-files are used to store configurations for different applications but they are sometimes used otherwise as well, for example Mozilla creates a .mozilla folder which contains their configuration files as well as browser cache. People tend to backup & also share their dot-files so others can boot-strap their own applications using those configuration files. An example of a site dedicated to sharing dot-files is http://dotfiles.org.

RafLance at Ask Ubuntu Visit the source

Was this solution helpful to you?

Other answers

If you mean when there's a . in front of a file name... The file is hidden. It won't show up unless you make your computer show hidden files and folders. Try making a new folder, and renaming it to something that starts with a . and then watch it disappear.

Daniel

Dot files are hidden, as Daniel and Sai said before. If you list files in the directory, they normally don't show up. In a GUI, mostly file-open/file-save dialogs, you hit the right mouse button, and get a context-menu, allowing you to show hidden files. Here is, how to handle them in the shell: example: $ > touch a b c .d .e f.f g. (generated testdata) $ > wc -l * 0 a 0 b 0 c 0 f.f 0 g. 0 total As you can see, the first command does not reveal .d and .e $ > wc -l .* wc: .: Is a directory 0 . wc: ..: Is a directory 0 .. 0 .d 0 .e 0 total wc -l .* shows them, and the 2 special files, . which is the PWD, the present working dir, and .. which is the parent of the pwd. $ > wc -l .* * wc: .: Is a directory 0 . wc: ..: Is a directory 0 .. 0 .d 0 .e 0 a 0 b 0 c 0 f.f 0 g. 0 total wc -l * .* works on normal and hidden files (which again repeats PWD and the upper directory, but for other commands, * .* might fit better, for example find -type f \( -name "*" -or -name ".*" \) -execdir wc -l {} ";" Which will not show the directories . and ... If you use firefox for file system browsing, file://home/joe you have an option box to show/hide those files.

user unknown

To clear up some possible confusion... there is nothing special about files or folders beginning with a dot, but by convention, they are simply not displayed unless you specifically request them to be. They are, by convention, for configuration files or directories in your home folder, with the dot prepended (not appended) to keep the directory listings cleaner. The conventional way to see them is by adding an a, for all, to the ls command if you are using a terminal. This can be combined with other switches (letters following a hyphen): ls -a In a graphic file manager, you will need to choose either "show hidden" or use the hotkey (in Nautilus, it is Ctrl-H) to see these files. Note that you can still enter the name if you know it's there - it is a valid filename, and is no different than any other file or directory. It is opened and saved just like any other.

Marty Fried

The how do I navigate to them wasn't answered from a GUI perspective. In nautilus do a Ctrl-H and you'll toggle visibility for "." files and folders in that nautilus window. There's also a selection for visibility in the View text menu.

fragos

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.