I'm trying to use the a Linux terminal to copy many files to a new location. I tired the command:
sudo locate -i *file_I_want* | xargs cp $1 /place_I_want_everything_copied_to/
Which, gives an error. What's the correct way to handle this?
Check out the
@javano 's comment is an answer as well, though would break if there are spaces in the filenames (though I believe spaces would break the xargs usage above as well)