File extensions (.jpg, .txt, .pdf, etc) are normally hidden by default in OS X. You can either set all extensions to be displayed through the following command:
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
To make the command take effect, you need to restart the Finder.
killall Finder
Revert to the default setting:
defaults write NSGlobalDomain AppleShowAllExtensions -bool false
Restart Finder
killall Finder