Drush supports many ways of specifying local and remote sites using site-aliases. There is also a method to support a group of site aliases and a generic multi-site identifier when issuing commands.
Given a site alias of @dev to dev-site.example I could issue the following Drush command from anywhere on my system (not just the Drupal webroot for dev-site):
drush @dev cc all;
If I were to define a group of site aliases as follows I could issue the command once from my shell and have it run sequentially on each site specified:
drush @dev-sites cc all;
A group site alias is defined as follows, it has aliases but no uri attribute:
$options['site-aliases']['all-dev'] = array( 'group' => array( 'dev.site1.com', 'dev.site2.com', 'dev.site3.com') );
If I had a large list of sites in my group I could even adjust the concurrency level of the command by passing a –concurrency option:
drush @dev-sites cc all –concurrency=6;
Lastly, a general alias for all sites knowable by Drush could be used as a simple means to run a command everywhere possible. This is the @sites placeholder:
drush @sites cc all;
Whether you run 1 site locally. Host a small number of websites, or many distributed websites across many servers — these options should help you to tweak and better make use of Drush commands.
Looking for quality Drupal Web Hosting? Look no further than Arvixe Web Hosting!