![]() ![]() ![]() In Linux almost all packages are available in internet in TAR file format. Also, by using TAR we can compress and decompress files and make a single file archive to transfer file. Here I am explaining some common and useful switches and it usages with examples. It is very useful in such conditions like when we want to send a lot of files via email, transfer files from one machine to another etc. The ‘tar’ saves many files together into a single tape or disk archive, and can restore individual files from the archive. This is very similar to the ZIP concept in Windows platform, what we are using commonly to save multiple file together. This is one of the most commonly using Linux command. For example: tar -cvpf backup. Just append those files by using these switches □ Read alsoģ, LSOF command details 15+ tar command usages with examples – Unix/Linux You can also add specific folders as identified via the find command. I was copying the folder before compressing to avoid read inconsistencies while the containers were still running. That’s it dude!! Sometimes, this will be very useful, if you created a TAR for a big directory and need to add few newly created files into your already created tarball. This was part of a larger script to backup my deployment folder. ~]# touch file3.txt ~]# tar -cvf archive.tar file1.txt file2.txt Listing files in archive using -t ~]# tar -tf archive.tarįile2.txt Adding a file to TAR archive ~]# tar -rf archive.tar file3.txt Check now! ~]# tar -tf archive.tar This TAR archive contains two files file1.txt and file2.txt Example Test files & creating tarball ~]# touch file1.txt It will help you to add more files/folders into an existing TAR archive. The “-r or –append” option with TAR command will do this. Here I’m explaining one of the useful TAR switch. Click here for more details TAR command usages. We already discussed the the basic switches of TAR command in one previous session. Fetch Kubernetes node details for quick analysis of your worker nodes ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |