Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #244076
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Multiple 7zip extract |
| Date | 2022-01-16 21:50 +0100 |
| Message-ID | <DGkDo-7dU-7@gated-at.bofh.it> (permalink) |
| References | <DGggr-4Aj-25@gated-at.bofh.it> <DGhct-594-7@gated-at.bofh.it> <DGhPb-5nm-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun 16 Jan 2022 at 20:44:12 (+0300), Gokan Atmaca wrote:
> On Sun, Jan 16, 2022 at 8:02 PM David Wright wrote:
> > On Sun 16 Jan 2022 at 18:59:49 (+0300), Gokan Atmaca wrote:
> > >
> > > I have hundreds of 7z compressed files in different folders. I want to
> > > open them. Every extracted file must be in the same directory. How can
> > > we do this?
> >
> > $ cd destination-directory-for-extracted-files
> > $ find top-directory-of-tree-containing-archive-files -type f -name \*7z -exec 7z e {} \;
> >
> > If the archives are not in one tree, but dispersed, you can specify
> > multiple directories between "find" and "-type".
>
> I'm already able to import into a single folder with the following. My
> problem is extracting 7z files, which are in thousands of folders with
> a size of close to 100GB, into their own directories.
> # find /home/z0/ob7z/ -name "*.7z" -type f| xargs -I {} 7z x -p***** -oextract7z {};
You obviously meant something else by "Every extracted file must be in
the same directory" from the literal meaning that I employed. And as
I don't use 7z myself, preferring infozip, I ignored efficiency, and
any use of xargs or switches¹, in favour of clarity.
"My problem is extracting 7z files … into their own directories."
I can't parse this either. Do the files in the archives all fit
into their own tree of directories, separate from the tree containing
all the archives? Or do the files in each archive have to be placed
in a single directory corresponding to that archive? Or in an
individual tree of directories, whose root corresponds to that archive?
And a minor point: is using "folder"/"directory" significant to you?
I assume that others haved guessed their answer to that, though
I haven't seen any specific code posted apart from the above.
¹ though obviously you can't avoid -psecret.
Cheers,
David.
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Multiple 7zip extract Gokan Atmaca <linux.gokan@gmail.com> - 2022-01-16 17:10 +0100
Re: Multiple 7zip extract Andrei POPESCU <andreimpopescu@gmail.com> - 2022-01-16 17:40 +0100
Re: Multiple 7zip extract David Wright <deblis@lionunicorn.co.uk> - 2022-01-16 18:10 +0100
Re: Multiple 7zip extract Gokan Atmaca <linux.gokan@gmail.com> - 2022-01-16 18:50 +0100
Re: Multiple 7zip extract Nicholas Geovanis <nickgeovanis@gmail.com> - 2022-01-16 19:40 +0100
Re: Multiple 7zip extract Nicholas Geovanis <nickgeovanis@gmail.com> - 2022-01-16 19:50 +0100
Re: Multiple 7zip extract Gokan Atmaca <linux.gokan@gmail.com> - 2022-01-16 21:30 +0100
Re: Multiple 7zip extract Andrei POPESCU <andreimpopescu@gmail.com> - 2022-01-16 20:00 +0100
Re: Multiple 7zip extract David Wright <deblis@lionunicorn.co.uk> - 2022-01-16 21:50 +0100
Re: Multiple 7zip extract Greg Wooledge <greg@wooledge.org> - 2022-01-16 22:40 +0100
csiph-web