zshrc file invisible in finder but present in terminal [duplicate]

When I give ls-a in my root folder I can actually see zshrc. but when I open my root folder in finder using the open . command, It's not visible. Actually many files are missing.Output when I give ls -a.As you can see the zshrc file is visible here. Output when I give open. I can't find it in the finder.


Solution 1:

According to Wikipedia:

In computing, a hidden folder (sometimes hidden directory) or hidden file is a folder or file which filesystem utilities do not display by default when showing a directory listing.

The ls command, of course, is a directory listing. The -a option "do not ignore entries starting with ." (ls man page)

So, yes the file is invisible, or hidden. But in the terminal, you are requesting to see all, including invisible or hidden, files.