On Mon, Mar 01, 2004 at 05:06:04PM +0200, Yedidyah Bar-David wrote: > On Mon, Mar 01, 2004 at 03:26:35PM +0200, Iftach Hyams wrote: > > Question 1 : > > --------------- > > Having 3 iso files (Fedora) mounted (-o loop...), I would > > like to have them all in one directory - each has Fedora/RPMS/ > > and the result should be one tree which symbolic link of all files > > from 3 of them. > > What you want is called union-mount. Linux doesn't have that (yet?). > I personally simply create a directory and manually (or with a script) > create links to all the rpms. Something like: > mkdir -p /isos/{cd1,cd2,cd3,allrpms} > mount -o loop image1.iso /isos/cd1 > mount -o loop image2.iso /isos/cd2 > mount -o loop image3.iso /isos/cd3 > cd /isos/allrpms > find .. -name "*.rpm" -type f -print | xargs -n 1 ln -s
Alternatively, you can build a symlinks directory manually. It would help you if you need to preserve the original structure: mount -o loop image1.iso /isos/cd1 mount -o loop image2.iso /isos/cd2 mount -o loop image3.iso /isos/cd3 cd /isos mkdir all cd all ln -s ../cd1/* . # now you see that under RedHat/RPMS you need to add files from a # different CD. # this removes the symlink: rm RedHat mkdir RedHat cd RedHat ln -s ../../cd1/RedHat/* . rm RPMS mkdir RPMS cd RPMS ln -s ../../../cd1/RedHat/RPMS/*.rpm . ln -s ../../../cd2/RedHat/RPMS/*.rpm . ln -s ../../../cd3/RedHat/RPMS/*.rpm . If you want to make that availble to network clients, then there is the question of protocol: apache and samba automatically dereference symlinks. But if you serve the files by anonymous FTP you'll have to make sure that the server root also includes the targets for those direcctories (In this example: the directories cd1, cd2 and cd3). If you use NFS: I'm not sure. Is the option 'nohide' in /etc/exports intended for such cases? -- Tzafrir Cohen +---------------------------+ http://www.technion.ac.il/~tzafrir/ |vim is a mutt's best friend| mailto:[EMAIL PROTECTED] +---------------------------+ ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]