Previously we posted an article on how to determine Magento version by checking the app/Mage.php file:
Here’s another technique that I like using PHP command line:
/httpdocs$ php -a
php > include 'app/Mage.php';
php > echo Mage::getVersion();
Credit for this goes to euperia.com.