When I use the terminal, is there any command to show hidden files and folders?
When I use the GUI (Graphical User Interface), are there any settings or keyboard shortcut to display hidden files and folders?
CodePudding user response:
Unlike on Windows, there are no flags that hide files and folders on Unix, at least on the common filesystems we have today (ext4 etc). Hidden files and folders generally are tagged by starting with a dot like .bashrc
for example.
To answer your question, I assume you are asking specifically about the command ls
.
Listing hidden files and folders with ls
can be accomplished by adding the argument -a
$ man ls
NAME
ls - list directory contents
...
-a, --all
do not ignore entries starting with .
Example:
$ mkdir tmp
$ cd tmp
$ touch a.txt
$ touch .b.txt
$ ls
a.txt
$ ls -a
. .. .b.txt a.txt
CodePudding user response:
As stated above
man ls
is a valuable tool and I would encourage you look into it directly.
That said. The short answer to show hidden files from CLI is
ls -a
If you're using a desktop environment, it's commonly