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

Keith Mitnick

As Chief Operating Officer of HCS Technology Group, Keith plays a pivotal role in driving operational excellence and technical innovation.

Speak with an Apple Certified expert today

We’d love to discuss your business challenges, even if you’re not sure what your next step is. No pitch, no strings attached.

Let's Talk