Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-19-2004, 08:43 PM   #1
Senior Member
Registered: Apr 2003
Posts: 3,688

Rep: Reputation: 55
Bash script to do copying and ISO image creating, etc.

Hi folks,

Please advise how to write a bash script to do following job.

If I want to create an ISO image from files in several directories, say,


I used following command line

# mkisofs -R -o Image.iso -J -hide-rr-moved /path/to/directory-A /path/to/directory-B /path/to/directory-C

But all files in 3 directories merged together, not under 'Direcotry-A', 'Directory-B', 'Directory-C', etc. separately. So I have to do the stupid way copying all them to a NEW directory for creating ISO image. If there are 40+ directories, it will take a lot of work.

I'm searching an easy way to eliminate copying steps, because I have to do it repeatedly every 15 days. I can create a tarball of all directories and burn the same on CD. But I could not read their files direct on CD without untar the tarball.


Old 09-19-2004, 08:52 PM   #2
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
mkisofs -R -graft-points -o Image.iso -J -hide-rr-moved directory-A/=/path/to/directory-A directory-B/=/path/to/directory-B directory-C=/path/to/directory-C
Old 09-19-2004, 09:47 PM   #3
Senior Member
Registered: Apr 2003
Posts: 3,688

Original Poster
Rep: Reputation: 55
Hi ToniT,

Tks for your advice.

I did not recognize '-graft-points' can handle multiple directories.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
K3B and creating an .iso image from a CD? rgbrock1 Linux - Software 5 11-23-2005 11:17 AM
Creating an ISO image of a CD tawalker Linux - Software 2 01-26-2005 11:03 PM
Command line question - creating ISO image satimis Linux - General 8 09-25-2004 03:18 AM
Creating ISO image question satimis Linux - Software 1 07-16-2004 11:32 PM
Creating dvd iso image chevy2410 Linux - Software 1 06-08-2004 06:40 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:13 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration