![]() In case, I missed anything or need to add some information, always feel free to leave a comment in this blog, I’ll get back with proper solution. I hope this blog is easy to understand about how to create and extract tar files in Linux. wildcards: Specify patterns in the tar command.v: show the progress of the archive file.Here, I explain short quick details about tar options html file from tar -jxvf 2 -wildcards '*.html' Tar -extract -file=2 Test.php 8) Extract a group of specific extension file from tar.gz file : tar -zxvf -wildcards '*.html' It will extract test.php single file from 7) Extract a single file tar.bz2 file : tar -jxvf 2 Test.php 6) Extract a single file tar.gz file : tar -zxvf test.php It will extract tar-bz-folder.bz2 tar file. It will compress bz2 compression with the highly compressed tar file. 5) Create the tar.bz2 file : tar cvfj 2 /var/www/html/php It will compress the content of the Temp folder exclude all. Then, you can use this below command : tar -czvf /var/www/html/Temp -exclude=*.php Now, If you want to exclude all files with specific file extensions. It will compress the content of Temp folder exclude Temp1 Folder and Myfile.php file. It will compress the content of multiple folders to the 4) Create the tar.gz with Exclude Directories and Files tar -czvf /var/www/html/Temp -exclude=/var/www/html/Temp/Temp1 -exclude=/var/www/html/Temp/Myfile.php It will extract the archive to the folder 3) Create the tar.gz with multiple directories or files at once tar -czvf /var/www/html/source-folder-name-1 /var/www/html/source-folder-name-2 /var/www/html/source-folder-name-3/temp.php ![]() Here, 2) Extract the tar.gz file : tar -xzvf 2 Answers Sorted by: 9 tar -xvjf itunes20140618.tbz itunes20140618/video That should do it for this case, but if you need more help do: info tar To extract specific archive members, give their exact member names as arguments, as printed by -list (-t). It will compress the contents of source-folder-name to a tar.gz archive named How to Switch PHP versions using Command Line in Ubuntuġ) Create the tar.gz file : tar -czvf source-folder-name.Let’s check in details about tar command : In Linux/Ubuntu there are so many times, we used to create tar.gz, tar.bz2 file, etc. In this tutorial, Today I will explain how to create and extract tar files in Linux. ![]()
0 Comments
Leave a Reply. |