![]() ![]() Join the nixCraft community via RSS Feed, Email Newsletter or follow on Twitter.Problem: I tried to unzip a file which looked like a gzipped file by the name. He wrote more than 7k+ posts and helped numerous readers to master IT topics. Vivek Gite is the founder of nixCraft, the oldest running blog about Linux and open source. For more info see tar command help page here and here. The commands should work on Linux and Unix-like systems. Windows untar gz how to#We have shown you how to extract tar.gz file from the command line. Tar -f file.tar -delete pic1.png pic2.png Conclusion Thus, for example, the files pic1.png and pic2.png can be removed from file.tar with the following: Pass the -delete option to GNU/tar command which allows specified files to be completely removed from a tarball. Tar -rf file.tar resume.doc How delete files from a tarball For example, the following would append a file named resume.doc to file.tar: Tar -cvzf /etc/ How to add files to an existing tarball ![]() Windows untar gz archive#In this example, create an archive named 2 of the files /etc/ directory that is compressed using gzip: Tar -cvf dump.tar /etc/ /home/vivek/Documents For example, the contents of two directories named /etc/ and /home/vivek/Documents/ could be archived into a file named dump.tar with the following: One can use the tar command to make archives from the contents of one or more directories. Tar -cvf data.tar file1.txt file2.txt file3.txt The following would create an archive file called data.tar from the three files named file1.txt, file2.txt and file3.txt that are located in the current directory: Let us see how to create a tarball using tar command. The resulting file is known as a tarball in Unix world. Tar command used to create a Tape ARchive. To view a list of the files within a tarball, issue the following command, enter: To extract an entire archive, specify the archive file name only, with no individual file names as arguments. In order to untar a tar file, the -x (for extract) and -f options are needed.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |