How to Backup a File in Linux


The Linux operating system has many configuration files. These files are normally plain text files that can be edited in any text editor. It is a good idea to create a backup copy of the file before making changes when editing any of the configuration files.

  • Open a terminal window. The terminal window will be found under the "Accessories," "System Tools" or "Utilities" section of the main menu.

  • Type the command "cd Directory/" to navigate to the directory that contains the file you want to backup. Replace the word "Directory/" with the correct name of the directory.

  • Type the command "cp file.txt file.bk" to create a backup copy of the file named "file.txt". The backup copy will be called "file.bk". Replace the file name with the exact name of the file you want to backup.

  • Type the command "ls -la file.bk" to make sure the file was created correctly.

  • Type the command "exit" to close the terminal window.


Promoted By Zergnet


You May Also Like

Related Searches

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!