Tag Archives: terminal

How to fix locale issues in Mac OS X Lion terminal

I faced a problem with locales in terminal on Mac OS X Lion. Midnight Commander didn’t want to display cyrillic symbols in filenames, on remote Ubuntu I’ve been getting messages like “warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)”. The solution is fairly simple – add these two lines to ~/.bash_profile (by default is seems to be missing, so create the file):

# Setting for the new UTF-8 terminal support in Lion
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

 

Show hidden files on Mac OS X Lion

The easiest way how to show hidden files in finder is to run a command in terminal: 
  • Open the Terminal application (Applications > Utilities > Terminal.app)
  • Type in the following without the quotes “defaults write com.apple.Finder AppleShowAllFiles TRUE”
  • Hit the ‘Enter’ key
  • Restart the Finder by holding ‘Option’, click and hold on the icon. Click ‘Relaunch’
To hide them again use this command:
  • To re-hide the files type “defaults write com.apple.Finder AppleShowAllFiles FALSE”
  • Then restart the Finder again.