In the Linux operating system, a hidden file is any file that begins with a ".". When a file is hidden it can not been seen with the bare ls command or an un-configured file manager. In most cases you won't need to see those hidden files as much of them are configuration files/directories for your desktop. There are times, however, that you will need to see them in order to edit them or even navigate through the directory structure.To do this you will need to know the correct options (for ls) or how to see them in your file manager of choice.
In this Linux Tips article I will show you how to view hidden files with ls, Thunar, Nautilus, and Dolphin.
If you need to see hidden files using the ls command you need to add the -a switch. But if you just add the -a switch most likely your files will fly by you and you will miss what you are looking for. To avoid this pipe the command through the less command like so:
ls -a | less
The above command will allow you to page through the contents so you can actually see what is there. You can scroll either up or down using the arrow keys or you can scroll down one page at a time with the space bar.
If you don't know, Thunar is the file manager for the Enlightenment desktop. In order to see hidden files in Thunar click the View menu and check the Show Hidden Files box (as shown in Figure 1.) Or you can hit the key combination Ctrl-H.
If you use the key combination you must make sure you are focused on the Thunar window. When you set Thunar to view hidden files it will always do so until you unset this option.
Nautilus is the file manager for the GNOME desktop. With the Nautilus file manager viewing hidden files is done in the same way. From the View menu select the Show Hidden Files option (see Figure 2) or hit the key combination Ctrl-H. Like Thunar, if you use the key combination you must be focused on the Nautilus window.
And like Thunar, the hidden file option will stick until it is unset.
Dolphin is the KDE file manager that replaced Konqueror. In order to view hidden files in this file manager you select the View Hidden Files option from the View menu. You can also enable this action by hitting the Ctrl-. key combination. And like both Thunar and Nautilus, in order to use the key combination Dolphin must be in focus or the combination will not work.
Again, like the other graphical file managers, this option will remain until unset.
Hidden files are an important part of the Linux operating system. Although you can go your entire Linux lifetime without ever having to view a single hidden file, on that one occasion that you will need to do so, it's good to know how.Advertisement
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.