Finding all instances of Drupal in Linux/Unix

Events happening in the community are now at Drupal community events on www.drupal.org.
kbaringer's picture

This is a post I added to my blog last week after beginning work on a tool that will return information about all Drupal instances installed on a particular server. Just cd to the web root in a terminal shell, run this command and it will show you all of the Drupal index.php files present. It's rudimentary, but gives you the general idea of where this is going.

http://kevinbaringer.com/node/42 (see excerpt below)

Further steps in this project may do any of the following:

  • Verify the existence of databases
  • Report back on modules used across installations
  • Perform some maintenance tasks using Drush or custom tools if necessary.

Please feel free to offer feedback or additional ideas for what useful functions a tool like this could perform.

Thanks!
~ Kevin

Excerpt:
In an environment where Drupal development has been going on for a while and people have been doing the experimentation required to gain familiarity with the platform, it's common for a lot of wayward Drupal installations to accumulate. Add to this a system which hosts numerous Drupal installations anyway (such as a university, large enterprise or a hosting service) and it can become challenging to keep track of them all.

Below is a simple Linux command that can help with this. It's a basic command that finds all instances of the index.php file in a tree and prints out only the ones that contain the string "DRUPAL_BOOTSTRAP_FULL". Since a Drupal installation will always have 1 and only 1 index.php file that contains this string there is a one-to-one correlation between this file and a Drupal instance.

New Hampshire

Group categories

Regional Audience

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: