In this tip, we are going to see how to use the Terminal to backup a file before changing or removing it. I have tested this tip under Ubuntu, but it is also operational on other Linux-based distributions.

Launch the Terminal, cd to the folder containing the file you want to backup and run this command:

cp filename{,.bk}

Replace filename with your own file name. The copied file will be created in the current folder having the .bk extension. If you have more commands used to backup files via the Terminal, please mention them in the comment form given below.

That's it!

Post a Comment