We'll extract to a different folder to be sure that permissions aren't in our way:
Open a terminal (Ctrl+Alt+T should work).
Now create a temporary folder to extract the file:
mkdir temp_for_zip_extract
Let's now extract the zip file into that folder:
unzip /path/to/file.zip -d temp_for_zip_extract
You should now have the contents of your zip file temp_for_zip_extract
and can copy them into the desired folder.
If you can't copy the files to your folder, then check the permissions on your target folder.
The path to the downloads folder depends on what you used to download it to, try ~/Downloads
. If you can't find it, then try this in a terminal:
cd ~; find -name 'filename.zip'
You can also use a file manager, of course. There is Nautilus, Nemo, Thunar and many more, depending on your environment. Start the file manager and double click on your zip file, just like you would do in Windows.
To extract
We can use zipinfo
as a part of this process, it's a program from zip
package.
zipinfo -2 example.zip
will only shows the files names in example.zip
, something look like:
file1-long-name-...-bla-bla.html
file2-long-name-...-bla-bla.html
so we can use this feature to extract all files:
zipinfo -2 example.zip | while read i;
do
long_fname=${i%.*}
unzip -p -c example.zip "$i" > "${long_fname:0:250}.${i##*.}"
done;
long_fname=${i%.*}
: Removes extension from long file name, so in case of file name being less that of 256 character; We're not going to get a duplicate extension.
${long_fname:0:250}.${i##*.}
: Creates a new file name with legitimate number of character also adds a .
and file real extension.
Simply we are looping into files list and extract each of them with a new legitimate file name which is 256 character.
To rename
You can use zipnote
command, it's a part of zip
package too.
Get a backup of your zip file first.
Run this command:
zipnote example.zip > names
Open names using an editor, it's look like this:
@ file name long in zip and a lot of other strings in the file name
@ (comment above this line)
@ (zip file comment below this line)
Add new file names like this:
@ file name long in zip and a lot of other strings in the file name
@=new short name for above file
@ (comment above this line)
@ (zip file comment below this line)
Then to rename files use:
zipnote -w example.zip < names
You renamed them all, you can also write a simple script which do this automatically for you.
Best Answer
If you want everything to be opened in one window you can use Double Commander alike file manager tools. If you are familiar with Total Commander, you'll get use to it quickly.
Example:
For GTK
For QT