How Do You Create A TAR File In Linux?
Tape archive (TAR) files originally were used in Linux and Unix environments to back up data to tape. Today, TAR files are used more commonly to store archives of files and directories in one single file rather than to tape. They function similarly to the ZIP file format in the Windows environment. TAR files are used frequently in Linux as a single file archive, so it’s ideal knowing how to create one. Step 1 Run a command line window. In most Linux graphical user interface (GUI) environments, a command line window is run by clicking on the desktop computer icon. Step 2 Go to the directory where you want to add the TAR file. For example, if the files are in /export/home/user, the command to go to that directory would be “cd /export/home/user.” Step 3 Create a TAR file. The command is: “tar -cvf myfile.tar filename1 filename2,” where myfile.tar is name of the TAR file.