HTTPS clone URL
Subversion checkout URL
Unpacking script which wraps a set of different tools like tar, unrar and unzib
Fetching latest commit...
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Unpack is a wrapper for set of unpacking tools such as tar, unrar, unzip. The main purpose of this script is to prevent user from agression of enemy archives which doesn't contains nested subdirectory and so throws many different items (files and/or directories) into current directory while unpacking. Which may be pretty painful if archive was unpacked in some ~/Downloads path which already contains many different files - new ones can easily be lost amongst old ones. In case if archive contains only one file or one directory, it will be extracted directly into target (current by default) dir. Otherwise, a folder named with the archive basename (without extension) would be created in the target directory were all archive containings would be placed. Archive type is deduced from archive extension. Supported archive types: rar, zip, 7z, bz2, gz, xz, lzo, deb, rpm, tared archives (tar.gz, tar.bz2, tgz, tar, etc...) USAGE unpack [OPTION]... ARCHIVE Options -h, --help show help -v show all processing info during unpacking -q, --quiet do not print result file or directory path -f, --force force item overwrite in case such already exists. In case of directories it will be fully deleted before unpacking a new one --version print script version EXAMPLES unpack test.tar.gz HINTS Good idea will be set some alias for fast using of this script like alias up='unpack' in the ~/.bashrc which will make 'up' to silently unpack specified archive and print unpacked file or directory where archive contents were placed. To unpack archive to needed path combination of unpack and cd commands must be used like: cd dir; unpack ../pack.tar.gz; cd $OLDPWD