LWM-Linux/06 - Linux File Operations/Compression and Archiving.md

1.7 KiB
Raw Blame History

Certainly! Let's delve into compression and archiving using gzip and tar in Linux Mint:

  1. Tar (Tape Archive):

    • Tar combines multiple files or directories into a single archive file.
    • Basic usage:
      • To create a tar archive: tar -cvf archive.tar files_or_directories
      • To extract from a tar archive: tar -xvf archive.tar
    • Combine with compression tools for smaller archives.
  2. Gzip:

    • Gzip compresses files individually.
    • Basic usage:
      • To compress a file: gzip filename (creates filename.gz)
      • To decompress: gzip -d filename.gz
  3. Combining Tar and Gzip:

    • Create a compressed tar archive (.tar.gz or .tgz):
      tar -czvf archive.tar.gz files_or_directories
      

Remember, these commands help manage files efficiently! Feel free to explore further or ask more questions. 😊🚀

Source: Conversation with Copilot, 7/12/2024