hdiutil makehybrid -o CDname.iso /Way/to/folder ; hdiutil burn CDname.iso

Create an ISO Image from a folder and burn it to CD

Create an ISO Image from a folder and burn it to CD (Os X)

By: vranx
2009-02-25 17:46:59

These Might Interest You

  • create iso image from directory . Usefull for virtualised machine To create CD ISO image of directories that contain long file name or non-8.3 format (particularly if you want to burn the CD image for use in Windows system), use the -J option switch that generates Joliet directory records in addition to regular iso9660 file names. For example, to create CD image of Vista SP1 directory: mkisofs -o VitaSP1.iso -J VistaSP1 Show Sample Output

    mkisofs -o XYZ.iso XYZ/
    eastwind · 2009-10-17 16:28:47 0
  • Create ISO image of a folder in Linux. You can assign label to ISO image and mount correctly with -allow-lowercase option.

    mkisofs -J -allow-lowercase -R -V "OpenCD8806" -iso-level 4 -o OpenCD.iso ~/OpenCD
    alamati · 2010-02-02 05:24:18 0
  • This is the fastest way to burn a DVD-Video from the command line. Dependencies: libav-tools dvdauthor growisofs The first command: avconv -i input.avi -target pal-dvd dvd.mpg converts any given video file avconv can handle into MPEG2-PS (6 Mbit/s) with AC3 audio (448 kbit/s). If your distribution is not up to date, just use ffmpeg - the syntax is the same. Hint: If you want to create an NTSC DVD, type ntsc-dvd instead ;-) The second command: echo PAL > ~/.config/video_format sets PAL as your default video format. This is a workaround for an old dvdauthor bug. If you want NTSC, guess what? Type NTSC instead! The third command: dvdauthor -o dvd/ -t dvd.mpg creates .VOB files and adds them to the dvd/ folder. You don't have to create this folder yourself. You can add as many titles as you like, just keep in mind that there's a maximum of 4482 MiB (4.37 GiB) for normal DVDs. The fourth command: dvdauthor -o dvd/ -T finishes the DVD-Video. Now you can burn your DVD using growisofs: growisofs -Z /dev/dvd -dvd-video dvd/ Sources: manpages http://tuxicity.wordpress.com/2006/12/01/avi-to-dvd-with-ffmpeg-and-dvdauthor/

    avconv -i input.avi -target pal-dvd dvd.mpg && echo PAL > ~/.config/video_format && dvdauthor -o dvd/ -t dvd.mpg && dvdauthor -o dvd/ -T && growisofs -Z /dev/dvd -dvd-video dvd/
    ppq · 2012-09-09 20:56:54 0
  • Many like to use 'dd' for creating CD/DVD iso images. This is bad. Very bad. The reason this is, is 'dd' doesn't have any built-in error checking. So, you don't know if you got all the bits or not. As such, it is not the right tool for the job. Instead, 'reaom' (read optical media) from the wodim package is what you should be using. It has built-in error checking. Similarly, if you want to burn your newly creating ISO, stay away from 'dd', and use: wodim -v -eject /path/to/image.iso

    readom dev=/dev/scd0 f=/path/to/image.iso
    atoponce · 2009-03-08 13:21:23 6
  • If you have a folder with thousand of files and want to have many folder with only 100 file per folder, run this. It will create 0/,1/ etc and put 100 file inside each one. But find will return true even if it don't find anything ... Show Sample Output

    folder=0;mkdir $folder; while find -maxdepth 1 -type f -exec mv "{}" $folder \; -quit ; do if [ $( ls $folder | wc -l ) -ge 100 ]; then folder=$(( $folder + 1 )); mkdir $folder; fi ; done
    Juluan · 2011-02-11 21:28:01 0
  • replace "directory name to burn on DVD" with actual directory name that you want to copy on DVD

    growisofs -Z /dev/dvd -J -r "directory name to burn on DVD"
    vleolml · 2009-05-11 12:42:18 0

What Others Think

Could we flag this OSX specific stuff somehow? I understand that it is a flavor of unix and a legitimate addition here (unlike windows crap), but when something uses a OSX only extension (hdiutils) to a OSX only framework (DiskImages) it is useful to know that without looking it up. Outside of OSX, it seems that the vast majority of commands can reasonably be expected to run on any flavor of unix -- the only problem is if a particular package is installed -- and for the most part, all the packages are reasonable 'core' and tend to be installed everywhere I check.
ozymandias · 482 weeks ago
It ist flagged, or better tagged, as Os X, as it is proposed: "For instance, if this commands needs a certain shell or OS, use these as tags." Maybe you have a better proposal to handle Os specific commands?
vranx · 482 weeks ago
Since the tags don't currently show on the main page, perhaps adding something like that to the description.
ozymandias · 482 weeks ago
Hmm, strange. I can see the Tags on the main page, logged in as well as logged out.
vranx · 482 weeks ago
I can confirm that no tags are displayed in the front page. Not that I can see, at least :-)
fedesilva · 482 weeks ago
fedesilva, same here.
ozymandias · 481 weeks and 6 days ago
Don't you see a sidebar at the right side, with sections like "stay in the loop", "news", "TAGS", "Popular Functions"?
vranx · 481 weeks and 5 days ago
vranx, sure, I see those. I see *no* indication on the front page that those are tied to any particular command. Instead, they appear to be a navigational aid that helps me navigate the cloud of tags on the site. If I wanted to look for the commands that have a particular tag, that would be great. Instead, I am looking at the frontpage, and I am seeing a bunch of commands, many of which are inapplicable in an way. It would be nice to see on each command a listing of the tags applied to it, and be able to add more tags myself. That way, I could see at a glance that people got it to work on other systems, or if it is a silly mac thing. Perhaps, in the future, I could filter what I see, and avoid seeing things that are confirmed mac-only commands.
ozymandias · 481 weeks and 5 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: