The tar command will extract all the files/folders in the archive to the current directory. show information as files are being extracted. You can use gzip to save the image file and make the backup smaller. Instead of using the -z flag you need to use the -j flag for the bzip2 format tar -xvjf Save an image to a tar.gz file using gzip. To extract to specific location modify the command as follows tar -xzf /path/to/locationĮxtracting tar.bz2 (bzip2 file) is very similar to the way you extract tar.gz file. If you want to extract it and keep the original, run this command: bzip2 -dk 2. To uncompress a bzip2 file, use the following command (this won't preserve the original. When you make a purchase using links on our site, we may earn an affiliate commission. Readers like you help support How-To Geek. ![]() file-or-folder-to-archive - the name of the folder we want to archive.Īdding multiple directories tar -czf file1 file2 folder1 folder2 Extract tar archives You can't use the tar command because the archive isn't a. Unzip and Untar Those tar.gz or tar.bz2 Files in One Step By Lowell Heddings Published If you are new to the world of Linux, you probably unzip your tar.The tar command can be used to create tar.gz archives. In the following example, we extract the tar.gz file. ![]() The tar files can be compressed with the gzip as gz format. The most common compressed archive file format in Linux is the tar.gz format. A tar file can be untared or extracted with the following command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |