Is there a compression utility that will allow extracting a file while skipping the first (container) directory.

My purpose is to create an automated install script that will download a specific .zip, extract and install. I want option to skip the container directory which is nearly always an undesirable name.

An example would be like using the rar option ep1

rar x -ep1 archive.rar
link|improve this question
You want to skip a directory? Or you just don't want the top-level directory within the archive created on extraction? – Flimzy Jul 3 '11 at 1:25
feedback

1 Answer

You could try p7zip, the Unix command line port of the popular archiving tool 7-zip. It may have the feature you are asking for, but I don't know what the command would exactly be.

If I understand correctly you could always try extracting the archive then doing:

cd archivename
mv * ..
rm -f archivename

This should move all the files from within the folder in to the directory above then delete the original containing folder.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.