I would like to rename some files and exclude others into a directory. I tried
find . -mindepth 1 -maxdepth 1 ! -name 000-default.conf ! -name default-ssl.conf -print0 |
xargs -0 -I {} sudo mv -- {} $(echo {} | sed 's/local.conf/local.example.com.conf/')
but it wouldn't work.
I think mv
command's second argument doesn't expand correctly.