Explain: {,} in cp or mv Bash Shell Commands

Originally published at: https://www.cyberciti.biz/faq/explain-brace-expansion-in-cp-mv-bash-shell-commands/

I often see commands as follows posted on blog or forums

cp /etc/httpd/httpd.{,.bakup}

OR

mv resume{z,}.doc

What is the purpose of {,} in Linux and Unix shell commands?


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki