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 .
Notes:
- The command begins with
ls(ell ess) and aspace - the
~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) space -A (hyphen capital A).
Here’s what this command showed me:
.DS_Store |
.atest.txt |
.localized |
test.txt |
The .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 .atest.txt .
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 .htaccess.
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.
A clean sweep
The next Tip will tell you about software to track what’s using space on your computer. You may be surprised by large files hiding from you. When I did a sweep of my MacBook Pro recently I recovered 10 gigabytes of space lost to some unexpected hidden files.
This archive has hundreds of Tips for using your Mac. Be sure to browse around for more great info. If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
The Yet Another Related Posts Plugin has suggested these Posts for you too:
- Share files easily with Dropbox
- Sweep your Mac clean
- The Invisible Magic of the Dot File
- List Applications and More
- More on copying files
Please share this Tip. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 New Zealand License.
Has this Tip helped you? Please leave a Comment below with your experiences.
Show your gratitude: these Tips are freely given, but your donations help me write more and better Tips.





