Sunday February 28th 2021 - Update issue with packman inode mirror
There are issues with the inode mirror, please configure an alternative mirror. See http://packman.links2linux.org/mirrors
-
Unzipping and Unraring
I can unzip or unrar a file without a problem, but how can I do the same for multiple zipped or rared files, without losing some of the contents.
When I try to do so, by selecting several zipped or rared files then right click then click on either "Extract here" or "Extract to Subfolders" the process starts without a problem. However, after everything has been extracted, and I have a look at the contents of the folders which have been extracted, I see that they are either empty or only have a few files.
I will get zipped files, photos from my brother, with upto 200 - 300 pictures, the whole zipped or rared files ends up being about 150MB - 200MB. If I get 3 or 4 such files, as I did after he came back from his trip to Australia, and sent 10 such files with over 1500 photos, I had to unzip each file individually, since when I tried to do 2 or more at a time, I managed only to extract a few pictures per zipped file.
Anyone know a solution?
Thanks.
-
Re: Unzipping and Unraring
> Anyone know a solution?
patience? (do one, look at its photos (whatever) while the second is
unpacking, etc..)
--
DenverD (Linux Counter 282315) via NNTP, Thunderbird 2.0.0.14, KDE
3.5.7, SUSE Linux 10.3, 2.6.22.18-0.2-default #1 SMP i686 athlon
-
Re: Unzipping and Unraring
That's what I have been doing so far. I'm patient enough now, I've had all that practice. I want to do more files and I want to do them now.
-
Re: Unzipping and Unraring
silkmaze schreef:
> I can unzip or unrar a file without a problem, but how can I do the same
> for multiple zipped or rared files, without losing some of the contents.
>
>
> When I try to do so, by selecting several zipped or rared files then
> right click then click on either "Extract here" or "Extract to
> Subfolders" the process starts without a problem. However, after
> everything has been extracted, and I have a look at the contents of the
> folders which have been extracted, I see that they are either empty or
> only have a few files.
I have the same problem with rar files that contain a space in the archive name.
To unpack it I resort to the command line:
rar x "bla bla001.rar" ~/home/chris/someplace
--
Chris Maaskant
-
Re: Unzipping and Unraring
silkmaze wrote:
> I can unzip or unrar a file without a problem, but how can I do the same
> for multiple zipped or rared files, without losing some of the contents.
> When I try to do so, by selecting several zipped or rared files then
> right click then click on either "Extract here" or "Extract to
> Subfolders" the process starts without a problem. However, after
> everything has been extracted, and I have a look at the contents of the
> folders which have been extracted, I see that they are either empty or
> only have a few files.
Maybe some day you develop enough courage to run an xterm with a shell
in it, like bash, zsh or ksh.
Then you discover that with a single line in this shell you can do tasks
many times faster and easier than in a GUI file manager.
> I will get zipped files, photos from my brother, with upto 200 - 300
> pictures, the whole zipped or rared files ends up being about 150MB -
> 200MB. If I get 3 or 4 such files, as I did after he came back from his
> trip to Australia, and sent 10 such files with over 1500 photos, I had
> to unzip each file individually, since when I tried to do 2 or more at a
> time, I managed only to extract a few pictures per zipped file.
>
> Anyone know a solution?
e.g. with
for file in *.zip;do unzip "$file";done
Or, even shorter,
unzip *.zip
As unzip knows how to process the files in order when supplied with a
wildcard.
-
Re: Unzipping and Unraring
I did the same thing with windows, but I didn't realise that I could run unzip in the command line. Can I run it in any directory or do I have to be in a specific directory, where unzip is stored, in order to run it?
Can I do the same with rar, is there a unrar for the cli or do I use unzip to extract from rar files as well?
-
Re: Unzipping and Unraring
You can run unzip from anywhere, but usually you want to be in the directory where the zip file is because the files will be unpacked underneath or in the same directory. Similarly for unrar.
One small correction to the last post. You want to quote the wildcard:
Otherwise unzip will treat the second and subsequent files as filenames to be extracted and of course that will not work.
-
Re: Unzipping and Unraring
> You can run unzip from anywhere, but usually you want to be in the
> directory where the zip file is
if unpacking multiple compressed files you have to be prepared when
(for example) two or more archives include a file named README or
ATT0001.JPG, then you are gonna have to make a decision to overwrite
or skip..
btw, if you were 'comfortable' at a M$ command line you should LOVE
it here...much more power here (yep, will take a while to learn the
new lingo, but POWER!!)..
again i throw out that word: just takes a little _patience_ to learn
the new chants...or, you can avoid the pain by stuffing what you are
used to into /etc/bash.bashrc.local, like:
alias cd..='cd ..'
alias copy='cp -i'
alias rename='mv -i'
alias md='mkdir'
alias rd='rmdir -i'
[note: some (all?) of those on the left of the equal sign might not
be from M$, since i left them in '95...maybe those are from
Warp...don't recall now..]
--
see caveat: http://tinyurl.com/6aagco
DenverD (Linux Counter 282315) via NNTP, Thunderbird 2.0.0.14, KDE
3.5.7, SUSE Linux 10.3, 2.6.22.18-0.2-default #1 SMP i686 athlon
-
Re: Unzipping and Unraring
Good thinking. Another way would be to unzip each file in its own directory so that there would be no clashes on unzipping and then you would have to reconcile any clashes later. Say you have a bunch of zip files in the current directory. First make a directory named after the zip file without the .zip, then unzip in that directory using the -d option to unzip.
Code:
for i in *.zip
do
mkdir "${i/.zip}"
unzip -d "${i/.zip}" "$i"
done
The idiom ${i/.zip} means $i with .zip replaced with nothing, i.e. removed from string.
It pays to read man pages, because you will then sometimes go ah, now I understand why that option was invented.
-
Re: Unzipping and Unraring
but, i _thought_ the purpose of his first post was to do them all at
the same time (which is why i said 'patience')...
hmmmmmm...i guess if i knew how to write a script i could make one
which would 'look at' all the archive file names in a directory and
1) make a sub directory for each, with the same name as the archive
(as long as no directory with that name already exists) and 2) unpack
each..
all with ONE command....or even with one CLICK....if that click
directed the script to look in an always used (for example)
/home/[user]/archives_to_be_unpacked
THEN silkmaze could get back to being impatient.. ;-)
--
see caveat: http://tinyurl.com/6aagco
DenverD (Linux Counter 282315) via NNTP, Thunderbird 2.0.0.14, KDE
3.5.7, SUSE Linux 10.3, 2.6.22.18-0.2-default #1 SMP i686 athlon
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|