1. Create a temporary directory.
2. Copy the files you want to burn to CD/DVD to this temporary directory.
3. Make an iso image out of it.
4. Mount the iso image (to make sure that it works)
5. Now insert the CD/DVD media in the drive and burn the data onto it.
Example:
1. bash#> mkdir ./temp_dir
2. bash#> cp /my_dir_path/myfiles ./temp_dir
3. bash#> mkisofs -J -R -o /my_dir_path/my_files.iso ./temp_dir
4. bash#> lofiadm -a /my_dir_path/my_files.iso
/dev/lofi/1
bash#> mount -F hsfs /dev/lofi/1 /mnt
5. bash#> cd /usb
bash#> cdrw -i /my_dir_path/my_files.iso
Looking for CD devices…
Initializing device…done.
Preparing to write DVD
Writing track 1…done.
Finalizing (Can take several minutes)…done.