Debian Admin - Your way to Debian World

September 15, 2006

Unpack (almost) everything with one command

by @ 11:58 pm. Filed under General

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

unp is a small perl script which makes extraction of any archive files a bit easier. It support several compressors and archiver programs, chooses the right one(s) automatically and extracts one or more files in one go.

You may also want to install some non-free packages like “unace” (not in Debian)
and “lha” to extract archives of these types.

unp installation in debian

#apt-get install unp

that’s it installation completed now.If you want to use unp follow the below examples

Examples how to use unp

unp *.tar.gz
unp *.tar.bz
unp *.rpm
unp *.deb
unp *.zip
unp *.rar

For more details check man page below

unp man page

NAME
unp - a shell frontend for uncompressing/unpacking tools

SYNOPSIS
unp [-u] file [ files … ] [ — backend args … ] ucat file [ files … ]

unp is a small script with only one goal: Extract as many archives as possible, of any
kind and from any path to the current directory, preserving the subdirectory structure
where needed. Is a Do-What-I-Want utility and helps managing several extraction programs without looking for needed options for the particular tool or worrying about
the installation of the needed program.

Run unp without arguments to see the list of supported archive formats.

The special version ucat acts as wrapper for commands that can output the extracted
data to standard output, like bzip (bzcat), gzip (zcat), tar,zip and others.

USAGE
unp extract one or more files given as arguments on the command line. Additionaly, it may pass some options to the backend tools (like taroptions) when they are appended after `–´.

There is also a special option (-u) which is very usefull for extracting of Debian packages. Using -u, unp extracts the package (i.e. the ar archive) first, then extracts data.tar.gz in the current directory and then control.tar.gz in control//.

NOTES
unp will try to decompress into a FILE.unp if it get trouble with existing files. But don’t count on this feature, always look for free working space before using unp.

In contrary to gunzip which decompresses the file in the target directory of the source file,unp will use current directory for output.

Ubuntu users can follow the same procedure.

Tags: , ,

2 Responses to “Unpack (almost) everything with one command”

  1. John Says:

    THX! Installed it on my vserver :)

  2. mrZilvi Says:

    Thanks, works well. :-)

Leave a Reply

Subscribe RSS Feed

subscribe to the Debian Admin RSS feed

Internal links:

Sponsors:



  • Cheap Web hosting services

Categories:

Support Debian Admin

Amount $:
Website(Optional):

Sponsors:

Archives:

Related Links:


Favourite Sites:

DebianAdmin is not related to the Debian Project.
This site is copyright © 2006,2007 Debian Admin
All Trademarks are the property of their respective owners.
The contents of this website may not be mirrored or archived without the express written permission of DebianAdmin Site Owner.

DISCLAIMER: All the information, troubleshooting methods, utilities offered in this website is provided AS-IS, without any warranties. Though I strive for perfection, and always test the validity and effectiveness of the troubleshooting content in various systems, I assume no responsibility for your use of these Fixes, Utilities and other troubleshooting advice. The author will not be liable for any special, incidental, consequential or indirect damages due to loss of data or any other reason. All use is completely at your own risk. Changes to the existing content and new additions are made to this website periodically, without notification.
Rodney's Kontera DynamiContext Plugin plugged in.