![]() If you would like to extract in a different directory, just use the option -C, which will extract the files into the specified directory as shown. ![]() To extract the contents of a compressed tar archive file named “ “, use the following command. ![]() If you want to untar in a different directory then use option -C ( specified directory). For instance, the command below will untar the file named ‘ tecmint-17-11-2023.tar‘ in the present working directory. To untar or extract a tar file, simply execute the following command using the 'x' option (extract). Tar cvfj 2 /home/tecmint/phpĬreate a tar.bz2 file Linux 4. Note: tar.bz2 and tbz are similar terms, both referring to tb2. To create a highly compressed new tar archive named 2 by bundling all files and subdirectories within the /home/php directory, use the -j option, which instructs tar to utilize the bzip2 compression algorithm, resulting in a smaller file size for efficient storage and transfer. However, the bz2 compression method requires more time for both compression and decompression, whereas gzip is faster in both processes. The bz2 feature compresses and creates an archive file that is smaller in size compared to gzip. Tar cvzf MyImages-17-11-2023.tgz /home/tecmint/MyImagesĬreate a Compressed Tar Archive 3. (Note: 'tar.gz' and 'tgz' are interchangeable terms). For example, the command below will generate a compressed file named '' for the directory ‘ /home/MyImages‘. To create a compressed archive file, we use the option 'z' (compress the archive using gzip).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |