Skip to content

How to Compress Files in Linux Tar Command

How to Compress Files in Linux Tar Command
Share

Reading Time: 2 minutes

In this tutorial “How to Compress Files in Linux Tar Command” ” we will show you how to use tar command in Linux and how to compress files and directories using tar command. You will also learn how to list contacts and untar using tar command.

How to Compress Files in Linux Tar Command

What is TAR command in Linux

How to Compress Files in Linux Tar Command. GNU `tar’ saves many files together into a single tape or disk archive, and can restore individual files from the archive. Note that this manual page contains just very brief description (or more like a list of possible functionality) originally generated by the help2man utility. The full documentation for tar is maintained as a Texinfo manual. If the info and tar programs are properly installed at your site, the command `info tar’ should give you access to the complete manual.

How to Compress Files in Linux  Tar Command

How to Compress Files in Linux Tar Command

How to create tar file in Linux

$ tar -cf archive.tar foo bar

How to List Tar File Contents

You can list tar file contents without extracting them.

$ tar -tvf archive.tar

List tar file content in Linux

How to extract tar files in Linux

$ tar -xf archive.tar

In the above example, you can also use ‘v’ to get verbose details.

You can also use zip command to zip file.

How to use ZIP command, You can find the steps mentioned in ZIP Tutorial

Tar Wikipage


Share

Leave a Reply

Your email address will not be published. Required fields are marked *

?>