I have a Textfile with one Filename per row:
Interpret 1 - Song 1.mp3
Interpret 2 - Song 2.mp3
...
(About 200 Filenames)
Now I want to search a Folder recursivly for this Filenames to get the full path for each Filename in Filenames.txt.
How to do this? :)
(Purpose: Copied files to my MP3-Player but some of them are broken and i want to recopy them all without spending hours of researching them out of my music folder)
+1 for @jm666 answer, but the
-J
option doesn't work for my flavor of xargs, so i chaned it to:Much faster way is run the find command only once and use fgrep.
You can use a while read loop along with
find
:filecopy.sh
Where
list_of_files.txt
is the list of files line by line, and/where/to/put/your/files
is the location you want to copy to. You can just run it like so in the directory:The easiest way may be the following: