# tar Command Builder

Build GNU tar create, list, and extract commands with compression, excludes, path stripping, and overwrite warnings.

## URL

https://ilham.dev/tools/tar-command-builder/

## What It Does

Generate GNU tar commands for creating, listing, and extracting archive files. Creation supports gzip, bzip2, xz, zstd, and no compression, with relative source paths and exclude patterns. Extraction defaults to refusing existing files and provides a separate listing command. The browser does not process archives or run commands.

## Features

- Generate GNU tar create, list, and extract commands
- Choose creation compression and GNU tar exclude patterns
- List an archive before extracting and optionally strip path components
- Refuse existing extraction files by default and explain overwrite risks

## Input

Archive path, operation, source or destination, and options form input.

## Output

POSIX shell commands for GNU tar text output.

## Privacy

Processing happens locally in the browser.

No input data is uploaded to ilham.dev.

- Requires login: false
- Requires API key: false
- Stores user data: false


## Examples

- Does this work with the tar installed on macOS?
- Is the archive path relative to the source base directory?
- Does refusing overwrites make extracting an unknown archive safe?
- Does the tool save paths or upload files?


## Limitations

- Generates text only; no file inspection or execution
- GNU tar required; compression programs must be installed separately
- No stdin/stdout pipelines, tilde expansion, or parent-path segments in source members
- Extraction options do not make untrusted archives safe


## Related Tools

- https://ilham.dev/tools/rsync-command-builder/
- https://ilham.dev/tools/zip-builder/


## Questions

### Does this work with the tar installed on macOS?

The output targets GNU tar. macOS commonly ships a different tar implementation; check support for every generated option or use GNU tar. The generated commands assume a POSIX shell, not PowerShell or cmd.exe.

### Is the archive path relative to the source base directory?

No. A relative --file path is resolved from the terminal's working directory. --directory changes the base for source paths during creation or the destination during extraction.

### Does refusing overwrites make extracting an unknown archive safe?

No. --keep-old-files refuses existing files but is not a security audit or a sandbox. Inspect the listing and extract without root privileges into an existing empty directory; other archive risks still apply.

### Does the tool save paths or upload files?

No. It only generates command text in the browser and does not save the input. It cannot inspect local files, check available compression programs, or verify an archive.

