Warning: This may be an instance where I think I know more than I do. If that proves true let me know.
Sometimes You Need To See Invisible Files
Your computer has a bunch of files on it that are invisible so that most users don’t touch them. This is usually a good thing but from time to time you may have a need to edit such a file.
This tutorial assumes the following:
- You are on a Mac.
- You have Sublime Text installed. If you don’t, you can download and install it without buying it. It is only needed for setup. (Other text editors can be used, YMMV.)
- You are cool with doing a few simple things in the command line, aka. Terminal.
How To Do It
- Launch Terminal (Applications > Utilities)
- Type
cd ~
to take you to your User folder. - Type
ls -A
to list all the files and folders. You’re looking for a file named .bash_profile. - Type
subl .bash_profile
. This will either open the file in Sublime Text (if it exists) or create the file in Sublime Text (if it doesn’t). - In the file add
alias show="defaults write com.apple.finder AppleShowAllFiles -boolean true && Killall Finder"
to create a command to show invisible files. You can rename “show” to something else if you like. - In the file add
alias hide="defaults write com.apple.finder AppleShowAllFiles -boolean false && Killall Finder"
to create a command to hide invisible files. You can rename “hide” to something else if you like. - Save and close the file “.bash_profile”.
- Quit Terminal.
- Relaunch Terminal.
- Type
show
in the Terminal and the Finder will show invisibles. Usehide
to reverse it. (You can do this from any folder. You just have to be in the Terminal.)
For the Terminal-adverse
I understand that some folks just don’t like the Terminal and that’s okay. For those folks I’ve been told that InVisible is a good app to use.