How to copy file and locate in new folder?

Hi All,

Please advise me how to make a copy of file from a list and store in one particular location?

For example , I have aaa.txt which contains as below, But, those *usg files might be randomly store in different location....
> cat aaa.txt
adc.usg
dfdjkf.usg
ugjfk.usg

And I want those *usg in aaa.txt store to /var/tmp together. :slight_smile:

Regards,

while read file
do
   cp `find / -name "$file" 2>/dev/null` /var/tmp 
done<aaa.txt
while read line
do
 l=$l" -name '$line' -o" 
done < "aaa.txt"
cmd="find / -type f ${l%-o} -print0|xargs -i -0 cp {} /var/tmp "
eval "$cmd"

Thanks you..