title_body: How to find duplicate IDs in epub?
upvoted_answer: Your best bet is to validate with EPUBCheck. That will catch dupe @ids and other errors. I use a command in Linux similar to:
  
  java -jar /home/epubcheck.jar book.epub -out errors.xml
  
  
  The errors.xml file will give you filename, line numbers, and error descriptions. 
  
  Or you can use an online validator at IDPF if you don't mind uploading your work.