title: Copy list of files from one location to another in linux
body: <p>I'm attempting to copy a partial list of files on a drive to a location on another drive. The list of files  to copy is in a text file that I've attempted to supply to a bash script as well as some cp and xargs commands but to no avail. Below is the bash attempt.</p>
  
  <pre><code>#!/bin/bash
  
  while read line
  do
      find . -iname "$line" -exec cp '{}' /my/destination/drive \;
  done &lt; file_list.txt 
  </code></pre>
  
  <p>The text file reads as filenames with no extensions, like below</p>
  
  <pre><code>my-file001
  my-file002
  my-file003
  </code></pre>
  
  <p>I've also tried xargs and pax with the below attempts, also to no avail.</p>
  
  <pre><code>cat file_list.txt | xargs cp -t /my/destination/drive
  </code></pre>
  
  <p>and</p>
  
  <pre><code>find . -type f -exec pax -rws'|.*/||' &lt; file_list.txt /my/destination/drive/ '{}' \;
  </code></pre>
  
  <p>This <a href="https://stackoverflow.com/questions/6179726/linux-find-a-list-of-files-in-a-dictionary-recursively">question</a> came close but not quite. Any suggestions?</p>