Ubuntu - CD - Write directory to CD

One step:

mkisofs -r -R -J -l -L /home/user1 | cdrecord dev=0,4,0 -v --eject speed=4 -

or the two step variation of the process:

mkisofs -r -R -J -l -L -allow-multidot -o /tmp/backup.iso -graft-points "/home/user1=/home/user1"
cdrecord dev=0,4,0 -v --eject speed=4 /tmp/backup.iso

or

mkisofs -r -R -J -l -L -o /fully-qualified-file-name-of-iso-image.iso /name-of-directory-containing-files-to-format-into-iso-image

Hidden files beginning with “.” and long file names are preserved.

WARNING: Ensure that the directory does not hold more than CD capacity (700Mb typically). Check with the command:

du -s /home/user1