Linux Tips: View hidden files
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.
LS
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.
Thunar
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.
Nautlius
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
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.
Final Thoughts
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
Which command can be used to list files and directories along with permissions applied to them?
I just tried command ‘ls -a|less’ normal. Thanks
Hello,
After im press Ctrl-H to see the hidden folder. how to auto close the hidden folder after 5 mint by use command line.
thank
Hidden files
this didn’t help
Great post!
You can also search hidden files with find command:
find /path-to-search -type f -iname “.*” -ls
Extracted from: http://www.sysadmit.com/2016/03/linux-ver-archivos-ocultos.html
hello!
i use kali linux 2.0 sana
my video directory is lost, i don’t know how and i’m amazed that the directories like music,video,photos,documents cannot be deleted, so how is it possible to loose video directory and please guide me to help recover it and fix this problem.
Wouldn’t rm -rf work also?
Hi
I re-loaded the op sys because of a problem but firefox lost all of my bookmarks. I have them backed up on thumb drive but they are all hidden files. How can I replace the ones it installed with my old ones from the thumb drive?
regards,
andrew
This works as well.
ls -d .[!.]?* | less
would not
ls -al
be preferable?