To show or see all the hidden files in a directory, you can use the ls
command followed by the -a
flag in the directory in Linux.
For example, to see all the hidden files in the myFiles
directory, you can use the ls -a
command like this,
# Show all files including
# hidden files in a directory
ls -a
This will show all the hidden files in the myFiles
directory.
How do I know which files are hidden files?
- In most Linux distributions, the hidden files start with a
.
symbol followed by the name of that file. - To hide a file called
hello.txt
, we can add a.
(dot symbol) to the start of the filename, so its name will now appear as.hello.txt
.
See the above code live in repl.it.
That's all 😃!