Skip to main content

Linux tar Command: Step-by-Step Compression and Extraction Guide

HardReset.InfoDecember 16, 20256 min29 views
4 connections·5 entities in this video→

Introduction to the tar Command

  • πŸ’‘ The tar command on Linux is used for compressing and extracting files.
  • 🎯 This video provides terminal examples for creating .tar archives, gzip compressed archives, compressing folders, listing archive contents, and extracting files.

Creating Archives

  • πŸš€ To create a basic .tar archive, use tar -cvf archive_name.tar file1 file2.
    • -c stands for create.
    • -v (verbose) shows files being processed (optional but useful).
    • -f specifies the archive filename.
  • πŸ“¦ To create a gzip compressed archive, use tar -czvf archive_name.tar.gz file1 file3.
    • The -z option enables gzip compression.
  • πŸ“ Folders can also be compressed using tar -cvf folder.tar folder_name.

Managing Archives

  • πŸ” To list the contents of an archive without extracting, use tar -tvf archive.tar.
    • The -t option lists archive contents.

Extracting Archives

  • πŸ“‚ To extract a basic .tar archive, use tar -xvf archive_name.tar.
    • -x stands for extract.
  • πŸ—œοΈ To extract a gzip compressed archive, use tar -xzvf archive_name.tar.gz.
    • The -z option is used here again for gzip extraction.
Knowledge graph5 entities Β· 4 connections

How they connect

An interactive map of every person, idea, and reference from this conversation. Hover to trace connections, click to explore.

Hover Β· drag to explore
5 entities
Chapters2 moments

Key Moments

Transcript22 segments

Full Transcript

Topics9 themes

What’s Discussed

Linuxtar commandFile CompressionFile ExtractionArchive FilesGzip CompressionTerminal CommandsLinux TipsCommand Line Interface
Smart Objects5 Β· 4 links
ProductΒ· 1
ConceptsΒ· 4