Create an iso image of a folder

We all know how to create an iso image of a DVD using ‘dd’ command. But, what if you want to create an iso image of a folder containing lot of files?

Here the command mkisofs comes to our help. The usage is as follows:

mkisofs -o /{dest_dir}/{dest_file.iso} /{absolute path to the actual folder that you want to create the image}

eg: mkisoft -o /mnt/mycontent.iso /opt/rhel/media/

In the above example, an image ‘mycontent.iso’ will be created under ‘/mnt’ partition for the folder ‘media’. The option ‘-o’ means the output file.