This is a simple question. I'm trying to copy all of the files in the current directory that start with axis-2
and end with .jar
into a target directory, ~/MyDirectory
.
My first attempt was
cp '^axis2.*jar$' ~/MyDirectory
... but when I try this, cp
outputs a "No such file or directory" error message. I'm not sure I can use regular expressions with cp
. I also haven't used regular expressions in a while, and my syntax could be off.
Does anyone have any suggestions on how to go about this?