Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to recreate in a local folder called /distro/fedora/ the full directory tree (including eventually hidden files, symlinks, etc.) contained in the .iso file just downloaded (Fedora-15-i686-Live-Desktop.iso).

I understand I can mount the ISO image using something like this:

mount -ro loop /path/to/image.iso /mnt

but then, which would be the best way to get a copy exact of what I see underneath /mnt in to /distro/fedora ?

cp, tar, clobber?

share|improve this question

migrated from stackoverflow.com Sep 16 '11 at 15:33

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 2 down vote accepted
 cp -a /mnt /distro/fedora

Or

 rsync -hxDPavilWH --stats --delete /mnt/ /distro/fedora/

The latter has the benefit of being efficient when updating, and it preserves hardlinked files (if iso9660 supports those...)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.