cmd:mkisofs 

find . -follow | less
mkisofs -r -N -d -D -J -f -allow-leading-dots -o $ISOF /tmp/backupshadow
mkisofs -r -N -d -D -J -f -allow-leading-dots -C `cdrecord -msinfo` -M $CDRW -o $ISOF /tmp/backupshadow

Help 

-r, -rational-rock          Generate rationalized Rock Ridge directors
-R, -rock                   Generate Rock Ridge directory information
-N, -omit-version-number    Omit version number from ISO9660 filename (violates ISO9660)
-d, -omit-period            Omit trailing periods from filenames (violates ISO9660)
-D, -disable-deep-relocation
                            Disable deep directory relocation (violates ISO9660)
-J, -joliet                 Generate Joliet directory information
-f, -follow-links           Follow symbolic links

mkisofs -r -N -d -D -J -f -C $TRACK -M $CDRW files…

-d     Omit trailing period from files that do not have a period.
       This  violates  the  ISO9660 standard, but it happens to work on
       many systems.  Use with caution.
-D     Do not use deep directory relocation, and instead just pack them
       in the way we see them.
       This  violates  the  ISO9660 standard, but it happens to work on
       many systems.  Use with caution.
-N     Omit version numbers from ISO9660 file names.
       This violates the ISO9660 standard, but no one really  uses  the
       version numbers anyway.  Use with caution.
-C last_sess_start,next_sess_start
-M device
       Specifies path to existing  iso9660  image  to  be  merged.
If the -C option is used in conjunction with the -M option,
mkisofs will create a filesystem image that is intended to be
a continuation of the previous session.  If the -C option is
used without the -M option, mkisofs will create a filesystem
image that is intended to be used for a second session on a
CDextra. This is a multi session CD that holds audio data in
the first session and a ISO9660 filesystem in the second
session.
-root dir
       Moves all files and directories into dir in the image.  This  is
       essentially  the  same  as using -graft-points and adding dir in
       front of every pathspec, but is easier to use.
dir may actually be several levels deep. It is created with  the
same permissions as other graft points.
-graft-points
       Allow to use graft points for filenames. If this option is used,
       all  filenames  are  checked  for  graft points. The filename is
       divided at the first unescaped equal sign.  All  occurrences  of
       '\\'   and   '='   characters  must  be  escaped  with  '\\'  if
       -graft-points has been specified.
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.
foo/bar/=../old.lis
will  include  the file old.lis in the cdrom image at /foo/bar/old.lis,
while
foo/bar/xxx=../old.lis
will include the file old.lis in the cdrom image at /foo/bar/xxx.   The
same sort of syntax can be used with directories as well.  mkisofs will
create any directories required such that the graft points exist on the
cdrom  image  -  the  directories  do  not need to appear in one of the
paths.  By default, any directories that are created on  the  fly  like
this  will  have  permissions 0555 and appear to be owned by the person
running mkisofs.  If you wish other permissions or owners of the inter-
mediate   directories,   see  -uid,  -gid,  -dir-mode,  -file-mode  and
-new-dir-mode.

Hiding files on a CD 

hide options 

Excerpted from mkisofs/README.hide

This document attempts to show how to hide files from being seen by an operating system accessing a CD as an ISO9660/Rock Ridge, Joliet or HFS CD. It also highlights some of the limitations …

Note: this document is about the various -hide options - not be confused with the -hidden options.

The various -hide options actually exclude the relevant directory entry from the directory tree. Therefore, it is not possible to access a file or directory that has be hidden with the -hide option when the ISO9600/Rock Ridge directory is mounted - because the directory entry does not exist on the CD (but the file data does). You would probably be able to access this file or directory when mounted as a Joliet or HFS CD (depending on other options used). Similarly, a directory entry hidden with the -hide-joliet option will not be accessible when mounted as an Joliet CD. Similarly for -hide-hfs etc.

If the file name to be hidden is a directory, then the directory and all its contents are hidden.

The main use of the hide options is on a multi platform (hybrid CD) to hide various files/directories that are operating system specific from been seen on the CD when mounted on another OS. i.e. You may want to hide Macintosh executables from being seen when the CD is mounted as a Joliet CD on a PC etc.

hidden options 

The -hidden options set the 'EXISTENCE' bit in the directory entry which means the file or directory will be invisible - unless some special option is used to mount or view the CD - Linux has the 'unhide' mount option to make these files visible. i.e. the directory entry exists on the CD.

-hidden glob

Add the hidden (existence) ISO9660 directory attribute for glob. This attribute will prevent glob from being listed on DOS based systems if the /A flag is not used for the listing. glob is a shell wild-card-style pattern that must match any part of the filename or path. In order to match a directory name, make sure the pathname does not include a trailing '/' character. Multiple globs may be hidden.

pkg:zisofs-tools 

Usage 

Info 

Utilities to create compressed CD-ROM filesystems.

Help 

Quick Help 

Detail Help 

First create a directory tree containing compressed files:

mkzftree input_dir compressed_dir

mkzftree will not overwrite an existing directory; you may want to "rm -rf" the directory tree if you are doing this from a script:

Second, invoke the patched mkisofs with the -z option:

mkisofs -z -R [other options] -o compressed.iso compressed_dir
-z, -transparent-compression
                            Enable transparent compression of files
-R, -rock                   Generate Rock Ridge directory information
Note:

compressed CD-ROM filesystems 

Usage 

ISOF=../disk1.iso
dirdel $tmp_f.Z
mkzftree . $tmp_f.Z
mkisofs -r -N -L -d -D -J -f -o $ISOF -z -R -graft-points $tmp_f.Z

Help 

mkisofs

-z     Generate  special  RRIP  records  for  transparently  compressed
       files.   This is only of use and interest for hosts that support
       transparent decompression, such as Linux 2.4.14 or  later.   You
       must  specify the -R or -r options to enable RockRidge, and gen-
       erate compressed files using the mkzftree utility before running
       mkisofs.

Figures 

case 1 

backup.iso: 110166016

Total translation table size: 0
Total rockridge attributes bytes: 430472
Total directory bytes: 1374208
Path table size(bytes): 7238
Max brk space used 250000
53792 extents written (105 Mb)
mount -o loop, du -b: 105750528
1k-blocks in df: 107584
105750528 + 430472 + 1374208 + 7238 + 250000 = 107812446
107584 * 1024 = 110166016
case 2, compressed volume 

backup.iso: 46039040

Total translation table size: 0
Total rockridge attributes bytes: 227310
Total directory bytes: 702464
Path table size(bytes): 3632
Max brk space used 123000
22480 extents written (43 Mb)
mount -o loop, du -b: 43492352
1k-blocks in df: 44960
22480 * 2048 = 46039040
44960 * 1024 = 46039040
1408000 /mnt/tmp/BAK030913/txtHist/u
$ du -b ~/txtHist/u
3874816 /home/tong/txtHist/u

History 

cd ~/dl/yhgt
mkzftree . ../yhgt.c
ISOF=../disk2.iso
mkisofs -r -N -L -d -D -J -f -o $ISOF -z -R -graft-points yhgt/=../yhgt.c

Plain CD 

ISOF=../disk1.iso
mkisofs -r -N -L -d -D -J -f -o $ISOF -graft-points yhgt/=.

Test 

$ dir ~/dl/disk?.iso
     202113024 Dec 20 00:32 disk1.iso
     170164224 Dec 27 14:40 disk2.iso
mount -o loop ~/dl/disk1.iso /mnt/tmp1
mount -o loop ~/dl/disk2.iso /mnt/tmp2