Sunday, September 3, 2017

Copying multiple files from a list to another directory

I have a list of filenames in a file "list.txt".

  1. I want to find out the absolute location of these files
  2. and then want to copy to another folder.
I did the following:


$ time for d in $(cat list.txt); do cp `find /media/My_Book/DATA/Raw/ -name "$d"` /media/F3F9/files/ ; done

No comments:

Post a Comment