Skip to content

stephendotcarter/unpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unpack

Recursively extract files

Install

  1. Download the required release:
  2. Make the unpack binary executable and move it to your PATH:
    chmod +x ./unpack-darwin
    sudo mv ./unpack-darwin /usr/local/bin/unpack
    
  3. You should now be able to use unpack:
    unpack
    v1.0
    Usage: unpack <file>...
    

From source

git clone https://github.com/stephendotcarter/unpack.git
cd unpack
go install

Usage

  • Here is an example compressed file
    $ tar -tf mydata.tgz
    subdir1.tar.gz
    subdir2.zip
    
  • Run unpack:
    $ unpack mydata.tgz
    Unpacking "mydata.tgz"
    + mydata.tgz
    + subdir1.tar.gz
    + subdir2.zip
    
  • View the extracted files:
    $ find .
    .
    ./mydata.tgz
    ./mydata
    ./mydata/subdir1.tar.gz
    ./mydata/subdir1
    ./mydata/subdir1/file2.txt
    ./mydata/subdir1/file1.txt
    ./mydata/subdir2.zip
    ./mydata/subdir2
    ./mydata/subdir2/data3.dat
    ./mydata/subdir2/data4.csv