AppleShowAllFiles does not show hidden files
Solution 1:
The bundle identifier is com.apple.finder
in lowercase.
defaults write com.apple.Finder AppleShowAllFiles YES
would also write the setting as a string, but it doesn't usually matter though.
defaults write com.apple.finder AppleShowAllFiles -bool true
osascript -e 'quit app "Finder"'
Solution 2:
Please use defaults read com.apple.finder AppleShowAllFiles
to read current status.
Note that it's different to use command with root user (e.g. sudo) or standard user and use com.apple.finder with Finder in lowercase.
For Hide hidden files
use defaults write com.apple.finder AppleShowAllFiles 0
from current user terminal window not using sudo
or sudo su
command.
For Show hidden files
use defaults write com.apple.finder AppleShowAllFiles 1
Then relaunch Finder using killall Finder
Tested on OS X 10.8.4.