Showing posts with label mac os x. Show all posts
Showing posts with label mac os x. Show all posts

25 October 2011

Where is .htaccess? How to show hidden files on Mac OS X Lion.

I hate .htaccess files for many reasons.
One is their annoying vanishing act on some systems- OS X in particular. (It's because of the [noname].[extension] format marking it as a 'system' file, I assume).

Anyway, to show hidden files on Mac OS X Lion 10.7:

Open Terminal (Open Finder, then look in the 'Utilities' folder)
In Terminal, enter this command and press return to run it:
defaults write com.apple.Finder AppleShowAllFiles YES

Relaunch Finder (Alt+Right Click on icon and choose 'relaunch'.).

Hidden files should now appear (as greyed-out icons to show they're hidden).  Make sure you don't delete anything important!

To undo this:
defaults write com.apple.Finder AppleShowAllFiles NO

18 October 2011

Where is .ssh/known_hosts?

I keep forgetting where this is, and Mac OS X's Spotlight is no help, so I'm writing this for me and anyone else who might search for "where is .ssh/known_hosts".

Open a new Finder window. Either open the 'Go' menu and select "Go to Folder...", or press ⇧+⌘+G (Shift+Cmd+G). In the dialog that pops up enter
~/.ssh
and press enter. Note the ~ (tilde) at the start.

This should open the folder, and often known_hosts will be the only file in this folder.

A little extra on the known_hosts file- If you're opening this to look for a line, be aware that TextEdit wraps the text- so visible lines are often not the same as actual lines. I am blessed with a big screen, so I stretch the window as far as I can to get the content to 'unwrap'.