[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Extracting directories from an ISO image, command line tool?

On 2015-09-10 at 10:18, Richard Owlett wrote:

> The Wanderer wrote:
>> On 2015-09-10 at 09:06, Richard Owlett wrote:
>>> Environment:
>>> Using dd I have copied physical [NO INTERNET AVAILABLE ;] Debian
>>> DVD's to
>>> /media/distributionA resulting in
>>> /media/distributionA/DVD1.iso
>>> /media/distributionA/DVD2.iso
>>> .
>>> .
>>> /media/distributionA/DVDn.iso
>>> Goal:
>>> Extract pool directory (and all of its sub-directories) resulting in
>>> /media/distributionA/poolA/
>>> /media/distributionA/poolA/contrib
>>> /media/distributionA/poolA/main
>>> What commands should I be looking at?
>>> TIA
>> Hmm.
>> In Windows, I know the 7-Zip utility can open and extract ISOs, but
>> the 7z command-line utility in Linux apparently doesn't have that
>> ability (at least not as packaged in Debian).
>> For most purposes, I'd just use mount and then either cp or rsync,
>> but if you need to automate it as non-root it looks like you can do
>> that with orrisox (part of the xorriso package):
>> orrisox -indev /path/to/file.iso -extract . -subdir 
>> /path/to/output/directory

Brainfart typo here; '-subdir' is not necessary and would probably give
an error. The command would be:

for file in /media/distributionA/*.iso; do \
  orrisox -indev "$file" . /media/distributionA/poolA ; \

And/or similar, more-complex twiddlings if you have other
/media/distribution* directories which you want to handle. (Note that
this will not work as expected if the two ISOs have any pathnames in

> Browsing man page suggests that "-extract iso_rr_path disk_path" is
> explicitly what I'm looking for. Don't have time for a detailed read
> right now. Thank you.

You're quite welcome.

   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: