Invisible Dot Files Revealed!
Mac Tip #363, 05 November 2008
In the last Tip, The Invisible Magic of the Dot File, you created a file named
.atest.txt and saved it on the Desktop. You won’t find it though: because the filename begins with a dot the system hides it from you.
So, how can we see these invisible files?
Use the Terminal to list Files
One way is to use the Terminal. Mac Tip #126/05-Nov-2003, A Historic Terminal provided a very brief introduction to this piece of software. Mac Tip #349, 30 July 2008, List Applications and More showed one way to list the files in a folder.
To recap — open Terminal and type the following command to list the content of the Desktop folder:
ls ~/Desktop .
- The command begins with
ls(ell ess) and a
~key is known as tilde. On most keyboards you find it to the left of the 1 key, and you’ll need to press Shift.
The problem is, that if you do that, you still can’t see the invisible file. I keep my Desktop clean, so the only thing that showed up in my list was
test.txt. The file
.atest.txt was missing.
So, I tried again, with a slightly different command:
ls -A ~/Desktop
Note: this time I typed
ls (ell ess)
-A (hyphen capital A).
Here’s what this command showed me:
.DS_Store file holds information about the folder, such as whether to use List View or Icon View. The
.localized file handles folder names for different languages, such as English, Japanese etc.
I can also now see both my
test.txt file and the invisible
Why are these files hidden?
The Operating System hides some files because most users don’t need to know about them. Many are essential to the functioning of your computer, while a few can be safely trashed or edited.
There’s an important rule though: trashing a hidden file could break your operating system and make your computer unusable. If you don’t know what a hidden file is and does then don’t touch it.
Other ways to see hidden files
Sometimes hidden files show up when you use certain programs. For example, I do most of my writing work with software called BBEdit. It has a menu option to ‘Open Hidden…’ because web designers often need to work with a hidden file called
I also use software called Pathfinder that replaces the built-in Finder. It offers many advantages, including a menu item to show and hide invisible files.