Skip to content

Instantly share code, notes, and snippets.

@jerry2605
jerry2605 / extract.py
Last active February 24, 2019 09:44 — forked from jobinlawrance/extract.py
A python script to recursively extract .tar.gz files and .gz files : reference - http://guanidene.blogspot.in/2011/06/nested-tar-archives-extractor.html
#! /usr/bin/env python
# -*- coding: UTF-8 -*-
"""A command line utility for recursively extracting nested tar archives."""
"""Don't know why tarfile can't extract .gz file, use gzip the extract the remain files"""
import os
import sys
import re
import tarfile