Reputation: 12201
I want to copy all files that begin with a string to a folder in the same directory. I've tried cp foo* backup/foo*
but get
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
How can I copy accomplish this?
Upvotes: 0
Views: 306
Reputation: 755074
cp foo* backup/
Just specify the target directory. This isn't a DOS command window.
Upvotes: 6