TAR.GZ File Extractor

Extract a single file from TAR.GZ archive by exact path (requires 7zip command)

Click to upload file or drag and drop file here

Maximum file size: 500MB Supported formats: application/x-tar-gz, application/gzip, application/x-gzip, application/octet-stream, .tar.gz, .tgz

Enter the exact file path from the archive. Use preview tool to see available files.

Key Facts

Category
Conversion & Encoding
Input Types
file, text
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The TAR.GZ File Extractor allows you to quickly retrieve a specific file from a compressed TAR.GZ or TGZ archive without needing to decompress the entire package.

When to Use

  • When you need to extract one specific configuration file from a large archive.
  • When you want to save disk space by avoiding a full extraction of a massive TAR.GZ file.
  • When you are working with remote server backups and only need to verify a single log file.

How It Works

  • Upload your TAR.GZ or TGZ archive file to the tool.
  • Identify the exact file path within the archive that you wish to extract.
  • Enter the file path into the input field and trigger the extraction process.
  • Download the single extracted file directly to your device.

Use Cases

Retrieving a specific source code file from a compressed project backup.
Extracting a single log file from a large server dump for troubleshooting.
Pulling a specific configuration file from a software distribution package.

Examples

1. Extracting a specific log file

System Administrator
Background
A server backup archive contains thousands of log files, and I only need to check the error log from yesterday.
Problem
Extracting the entire 2GB archive just to get one 50KB log file is inefficient.
How to Use
Upload the backup.tar.gz file and enter 'logs/2023-10-27-error.log' into the file path field.
Outcome
The tool extracts only the requested log file, allowing for immediate review without waiting for a full decompression.

2. Retrieving a config file

Developer
Background
I have a large application archive and need to verify the database connection settings.
Problem
I don't want to unpack the entire directory structure just to read one configuration file.
How to Use
Upload the app_dist.tgz file and specify 'config/database.yaml' as the target path.
Outcome
The database.yaml file is extracted instantly, providing the necessary configuration details.

Try with Samples

file

Related Hubs

FAQ

Can I extract multiple files at once?

No, this tool is designed to extract a single file per operation based on the provided path.

How do I know the correct file path?

You should use a file preview or listing tool to identify the exact directory structure and filename inside your archive before running the extraction.

Is there a file size limit?

Yes, the tool supports archives up to 500MB in size.

Does this tool modify the original archive?

No, the original TAR.GZ file remains unchanged; the tool only reads the archive to extract the requested content.

What formats are supported?

The tool supports .tar.gz and .tgz archive formats.

API Documentation

Request Endpoint

POST /en/api/tools/tar-gz-selective-extract

Request Parameters

Parameter Name Type Required Description
archiveFile file (Upload required) Yes -
filePath text Yes Enter the exact file path from the archive. Use preview tool to see available files.

File type parameters need to be uploaded first via POST /upload/tar-gz-selective-extract to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-tar-gz-selective-extract": {
      "name": "tar-gz-selective-extract",
      "description": "Extract a single file from TAR.GZ archive by exact path (requires 7zip command)",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=tar-gz-selective-extract",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]