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?
|
feedback
|
|
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) | |||
|
feedback
|
cpshould do what you want withcp -r /a/folder– javano Feb 3 at 17:04