Linux files and folders have a “hidden” attribute that is tied in with how they are displayed in directories. When a file or folder name is marked as hidden, it will not be visible when the user navigates to the directory containing it.
Typically this means that users can navigate through their filesystem without ever seeing most of the data on their hard drives. However, this attribute can be useful for files that are not meant to be seen or accessed by the user.
List hidden files in Linux
Let’s take a look at how to list hidden files in Linux.
This is done using the `ls` command, which works much as it does in DOS and Mac OS X systems. The command can be used to list all directories and subdirectories, but there are some limitations. For example, users cannot see hidden files or folders whose name starts with a period (.) unless they use the `-a` flag.
To list only directories and subdirectories, use the following command:
Hidden files and folders will not be displayed. To list only hidden files, use the following command:
ls -a /home/user/test/
To list hidden files in the current directory type.