We excluded some modules from drush update (--lock=module_name). Is there a way to get a list of locked modules? A drush command or a file with the list?
There is no way to do this via Drush; the easiest way to find the locked files is with the
find . -name ".drush-lock-update"
If listing the locked Drupal modules is something you do often you can create a drush shell alias.
Add the following code to your drushrc.php file. Your personal one is normally located at ~/.drush/drushrc.php There are 6 locations that drush will look for drushrc.php, see the example.drushrc.php file for more information.
$options['shell-aliases']['locked-modules'] = '! find . -name ".drush-lock-update"| sed \'s#/[^/]*$##\' | sed \'s!.*/!!\' ';
You can then run,
to see a list of locked modules. The code above in addition to finding the .drush-lock-update files strips this filename off and then strips off all but the module name from the path.