User:CBM/TemplateList

How to make a list of pages that once used a template, from a database dump.
 * 1) Download templatelinks.sql.gz and page.sql.gz
 * 2) zcat templatelinks.sql.gz | perl stage1.pl TemplateName TMPFILE
 * 3) zcat page.sql.gz | perl stage2.pl TMPFILE RESULTS
 * 4) rm TMPFILE

Results are in RESULTS.txt

Source

 * Stage1.pl:


 * Stage2.pl