Thursday, October 30, 2014

Find Drupal Installs on Your Server

Need to find Drupal installs on your 'Nix webserver? Run this on your docroot:

sudo find . \( ! -path '*/sites/*' ! -path '*/profiles/*' ! -path '*/themes/*' ! -path '*/modules/*' \) -iname 'CHANGELOG.txt' | xargs grep -m 1 'Drupal' -s1

Output will look something like this:

./cms/core/d7/drupal-7.32/CHANGELOG.txt-
./cms/core/d7/drupal-7.32/CHANGELOG.txt:Drupal 7.32, 2014-10-15
./cms/core/d7/drupal-7.32/CHANGELOG.txt-----------------------
--
./cms/core/d8/drupal-8.0.0-beta2/core/CHANGELOG.txt:Drupal 8.0, xxxx-xx-xx (development version)
./cms/core/d8/drupal-8.0.0-beta2/core/CHANGELOG.txt-----------------------
--
./cms/core/d6/drupal-6.33/CHANGELOG.txt-
./cms/core/d6/drupal-6.33/CHANGELOG.txt:Drupal 6.33, 2014-08-06
./cms/core/d6/drupal-6.33/CHANGELOG.txt-----------------------