I'm using Fedora 17 and bash as my shell. I have a specific zip file, which has just one folder in it's root. I.e. upon unpacking the zip file i see the following:
> unzip myzip.zip
Supposing you know, that there is only 1 folder packed in the zip file, how do I find out the name of the main folder inside the zip file, without actually unpacking the zip file?
I'm looking for a one-liner, that would enable me to do something like this:
> <command> myzip.zip
I know there are ways to list all the files in the zip with
less, but that lists all the files in the subdirectories etc. I just want to know the name of the one folder. I know I'm missing something basic..