Usually I use tar
for *.tar archives, zip/unzip
for *.zip, 7z
for *.7z , etc… Is there an über utility that combine all algorithms?
Here is pseudo usage of this utility:
Extracting:
$ unpack *.tar -d /home/c0rp/this_is_tar
$ unpack *.rar -d /home/c0rp/this_is_rar
$ unpack *.tar.gz -d /home/c0rp/this_is_targz
$ unpack *.zip -d /home/c0rp/this_is_zip
$ unpack *.7z -d /home/c0rp/this_is_7z
Compressing:
$ pack some_name.tar /home/c0rp/for_tar1 /home/c0rp/for_tar2
$ pack some_name.rar /home/c0rp/for_rar1 /home/c0rp/for_rar2
$ pack some_name.tar.gz /home/c0rp/for_targz1 /home/c0rp/for_targz2
$ pack some_name.zip /home/c0rp/for_zip1 /home/c0rp/for_zip2
$ pack some_name.7z /home/c0rp/for_zip1 /home/c0rp/for_7z
Best Answer
I just realized that 7-Zip (command
7z
) can do it. 7-Zip is able to extract and compress many types of archives. Here is a quote fromman 7z
:7-Zip can extract/compress archives and is detecting the compressing algorithm itself.
This should work as you are expecting:
Compressing
Extracting
Also here is a little test. Here I create five archives and give them different filename extensions.
Now to detect the compressing algorithm, I will use the
binwalk
utility.