title: Deleting specific files in a directory using bash
body: <p>I have a txt file with a list of files (approximately 500) for example:</p>
  
  <pre><code>
  file_0_hard.msOut
  file_1_hard.msOut
  file_10_hard.msOut
  .
  .
  .
  file_1000_hard.msOut
  
  </code></pre>
  
  <p>I want to delete all those files whose name is not in the txt file. All of these files are in the same directory. How can I do this using bash where I read the text file and then delete all those files in the directory that are not in the text file. Help would be appreciated.</p>