tar Verified for v1.35 LTS

Tar Command: Extract Archive Into Target Directory

Use for extract archive into target directory with Tar. Exact CLI syntax to extract archive into target directory using Tar.

When to use this: Use for extract archive into target directory with Tar.

Command Syntax

tar xf <path/to/source.tar[.gz|.bz2|.xz]> -C <path/to/directory>

Live Command Builder

Final Command

tar xf <path/to/source.tar[.gz|.bz2|.xz]> -C <path/to/directory>

Command Breakdown

-C
Directory
Changes to the target directory before running the archive operation.

FAQ

Purpose: Exact syntax to extract archive into target directory using Tar.

Test path: Replace placeholders and run destructive commands in a disposable workspace first.

Flag behavior: Tool version, platform, and shell can change behavior.

Improve This Command

Suggest a correction, safer default, or version-specific note for this entry.

Related Operations

Alternative Approaches

Alternative tools for similar operation intents.

Back to Tar directory