Last Updated: February 25, 2016
·
452
· stevenwadejr

Make a Backup of a File

Saw this pro tip on CW and had to share and clarify.

This will copy the file with the original extension and append ".bak" to the new file:

cp FILENAME.EXTENSION{,.bak} 

This will copy the file from the old extension to the new extension ('.bak')

cp FILENAME{.EXTENSION,.bak} 

Thanks Marc for the tip!