DEV Community

loading...
Cover image for How to show or see all the hidden files in Linux?

How to show or see all the hidden files in Linux?

MELVIN GEORGE
Hi, I'm Melvin George, A web developer, and a blogger.
Originally published at melvingeorge.me ・1 min read

Originally posted here!

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
Enter fullscreen mode Exit fullscreen mode

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 😃!

Feel free to share if you found this useful 😃.


Discussion (0)