Mkisofs - crée iso avec les paths des fichier
Résolu
blade
-
jipicy Messages postés 40842 Date d'inscription Statut Modérateur Dernière intervention -
jipicy Messages postés 40842 Date d'inscription Statut Modérateur Dernière intervention -
Bonjour à tous,
Voila, lorsque j'exécute la commande "mkisofs -v -o /tmp/dvd.iso -path-list /tmp/filelist.txt"
Le /tmp/filelist.txt contient bien les chemins a mes fichier à integrer a l'image iso:
# cat /tmp/filelist.txt
/Files/client1/project1/projet.txt
/Files/client2/texte.txt
/Files/test1.txt
/Files/test2.txt
Mes fichiers sont bien tous crée sur l'image iso.
# mount -o loop /tmp/dvd.iso /mnt/dvd
# ls -l /mnt/dvd
-r-xr-xr-x 1 root root 10 May 5 01:53 projet.txt
-r-xr-xr-x 1 root root 13 May 5 02:51 test1.txt
-r-xr-xr-x 1 root root 13 May 5 02:52 test2.txt
-r-xr-xr-x 1 root root 6 May 5 02:53 texte.txt
Mais Il sont tous dans le "root" càd le "/" du dvd. Ma question est, existe-t-il un moyen de garder l'arboressance de mes fichiers sur l'iso,
Merci d'avance pour toutes réponses/réflections sur ce problème.
Voila, lorsque j'exécute la commande "mkisofs -v -o /tmp/dvd.iso -path-list /tmp/filelist.txt"
Le /tmp/filelist.txt contient bien les chemins a mes fichier à integrer a l'image iso:
# cat /tmp/filelist.txt
/Files/client1/project1/projet.txt
/Files/client2/texte.txt
/Files/test1.txt
/Files/test2.txt
Mes fichiers sont bien tous crée sur l'image iso.
# mount -o loop /tmp/dvd.iso /mnt/dvd
# ls -l /mnt/dvd
-r-xr-xr-x 1 root root 10 May 5 01:53 projet.txt
-r-xr-xr-x 1 root root 13 May 5 02:51 test1.txt
-r-xr-xr-x 1 root root 13 May 5 02:52 test2.txt
-r-xr-xr-x 1 root root 6 May 5 02:53 texte.txt
Mais Il sont tous dans le "root" càd le "/" du dvd. Ma question est, existe-t-il un moyen de garder l'arboressance de mes fichiers sur l'iso,
Merci d'avance pour toutes réponses/réflections sur ce problème.
1 réponse
Salut,
Extrait du "man mkisofs" :
Extrait du "man mkisofs" :
pathspec is the path of the directory tree to be copied into the iso9660 filesystem. Multiple paths can be specified, and mkisofs will merge the files found in all of the specified path components to form the cdrom image. If the option -graft-points has been specified, it is possible to graft the paths at points other than the root directory, and it is possible to graft files or directories onto the cdrom image with names different than what they have in the source filesystem. This is easiest to illustrate with a couple of examples. Let's start by assuming that a local file ../old.lis exists, and you wish to include it in the cdrom image.;-))
Merci ca marche nikel. Donc pour utiliser l'option -graft-point de mkisofs (donc pour crée l'arborescence souhaiter dans une image iso) mon fichier /tmp/filelist.txt ce présente comme ceci.
#cat /tmp/filelist.txt
/Files/client1/=/Files/client1/test.txt
/Files/client2/project1/=/Files/client2/project1/test.txt
...
=> donc la partie avant le = détermine le repertoire a crée sur l'iso, et la partie après determine le fichier a mettre dans ce repertoire...
La commande ce présente donc comme ceci:
#mkisofs -J -R -v -o /tmp/dvd_archives.iso -path-list /tmp/filelist.txt -graft-points
Enjoy.
Regards, blade