Archives and Compression Print

  • 0

Bundling and shrinking files.

WHAT tar DOES

Bundles many files into one, optionally compressed.

WHY IT EXISTS SEPARATELY FROM COMPRESSION

One tool groups, another compresses; they are combined by an option.

WHAT THE COMMON OPTIONS MEAN

c to create x to extract t to list f to name the file v to show progress z for gzip compression j for bzip2

WHAT TO DO BEFORE EXTRACTING ANY ARCHIVE

List its contents.

WHY

Some archives extract into the current directory rather than a folder, scattering files everywhere.

WHAT THE STRIP OPTION DOES

Removes leading directory levels on extraction.

WHERE THAT IS USEFUL

Extracting a release archive whose top folder you do not want.

WHAT zip AND unzip PROVIDE

Compatibility with archives from other systems.

WHAT gzip, bzip2 AND xz DO

Compress single files, with differing speed and ratio.

WHAT TO CHOOSE

gzip for speed, xz for size.

WHAT TO BE CAREFUL WITH

Extracting archives as root, which can create files owned by root inside an account Archives containing absolute paths Very large archives filling the disk during extraction

WHAT TO CHECK BEFORE EXTRACTING

Available space, against the uncompressed size.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot