I am trying to copy some of the files in a directory. The directory contains following files
my current directory is ~/certificate/
drwxrwxr-x 2 ubuntu ubuntu 4096 Oct 16 11:58 apache
-rw-rw-r-- 1 ubuntu ubuntu 5812 Oct 16 11:20 apache.keystore
-rw-rw-r-- 1 ubuntu ubuntu 1079 Oct 16 08:31 csr.txt
-rwxr-xr-x 1 ubuntu ubuntu 36626564 Oct 16 10:08 my.war
drwxrwxr-x 2 ubuntu ubuntu 4096 Oct 16 09:39 tomcat
-rw-rw-r-- 1 ubuntu ubuntu 6164 Oct 16 09:31 tomcat.keystore
I want to copy all files to ~/certs/ except my.war. I have tried following command without success. I do not want to move my.war out of the folder even temporarily.
cp -r ~/certificate/(?!m)* ~/cert/.
Please help me with suitable regular expression or any other tool.