In this example, the file named “file1.txt” with be copied to a file named “file1.txt.bak” without having to type in the second file name. This is done using brace expansion.
In Terminal, enter the command below:
cp file1.txt{,.bak}
You should now have two files:
file1.txt
file1.txt.bak