Subject: Re: mkisofs puts all files in root?
To: Jukka Marin <jmarin@pyy.jmp.fi>
From: Malcolm Herbert <mjch@mjch.net>
List: netbsd-users
Date: 04/29/2002 19:53:59
On Mon, Apr 29, 2002 at 11:03:56AM +0300, Jukka Marin wrote:
|I installed the latest version of cdrecord package (not
|cdrecord-current) on my NetBSD15ZC system and ran
|
|  mkisofs -l -L -N -o /tmp/isofs -r -v -v jpg/99????
|
|When I burned a CD, I found that all files are in the root directory,
|and the original directory tree was completely lost. I was expecting
|to see several subdirectories under jpg and the files in the
|subdirectories.

sounds fairly standard behaviour for mkisofs ... not intuitive, but
the filespec stuff can be useful sometimes

|I believe I have used the same command line succesfully before to
|copy the directory hierarchy to CD.
|
|Is mkisofs broken or am I just blind (I have read the man page, but
|afaict, this should work).

basically if you specify a file or path, it will end up at / on the cd
image - unless you do something like

/cd/path=real/path/file

all your files that are globbed by jpg/99???? will end up in the CD /

try using jpg instead, or if that won't work you will need to use the
filespec directive and mung it that way ... ie, create a file with the
appropriate filespec - something like this should work:

sh -c 'for f in jpg/99????; do echo "$f=$f"; done' > filespec

then use the appropriate option for specifying a filespec file ...

I've found that by far ad away the easiest thing to do with mkisofs
is to create a symlink tree of all the stuff I want on the CD, then
use the -f option to have mkisofs follow symlinks. it's a pain if
you _need_ symlinks but otherwise it's more flexible than filespecs
(mainly because I can never remember which comes before the =, real
path or cd path, but in any case you can then use your normal file
tools to generate the appropriate heirarchy)

HTH

-- 
Malcolm Herbert                                This brain intentionally
mjch@mjch.net                                                left blank