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?

link|improve this question
feedback

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

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

1 Answer

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...)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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