Changing $PATH in Mac OS X

Two Paths Through the Tangled Japanese Forest

by Stuck in Customs via flickr

I’ve started few days ago using Mac OS X. While I still prefer Linux I appreciate the fact that I have the bash power within and I don’t have to go for cygwin anymore. However cygwin is a great tool!

The first thing I had to do was changing the PATH environment variable in my shell for having the newly installed XAMPP binaries. Here is how: edit your ~/.profile file (create it if not exists) and add/change the line export PATH=$PATH:/path/to/your/bins.

Easy! 🙂

Make an ISO image

Here is how to create an ISO image (file .iso) on your hard disk. Useful when needed to make multiple copy of a CD. The following example starts create it directly from CD but since in Linux everything is a file… 🙂

mkisofs -D -o ~/my-cool-cd.iso /cdrom

the -D option allow the deep ISO9660 directory nesting.

You can easily use this command even from windows by installing the cygwin with the mkisofs package.

UPDATE

The command above it’s a bit strict. In order to create a more “relaxed” cd-rom you could use the following command

mkisofs -l -D -N -relaxed-filenames -V “Volume Label” -o ~/my-cool-cd.iso /cdrom

Here the options:

  • -l: Allow full 31-character filenames.  Normally the  ISO9660
    file-name  will  be in an 8.3 format which is compatible with MS-DOS,
    even though the ISO9660 standard allows filenames of  up  to  31
    characters.   If  you use this option, the disc may be difficult to
    use on a MS-DOS system, but will work on most other  systems. Use
    with caution.
  • -D: Do not use deep directory relocation, and instead just pack them in
    the way we see them. If ISO9660:1999 has not been selected, this
    violates the ISO9660 standard, but it happens to work on many
    systems.  Use with cau- tion.
  • -N: Omit version numbers from ISO9660 filenames. This  violates  the
    ISO9660 standard, but no one really uses the version numbers anyway.
    Use with caution.
  • -relaxed-filenames: Allows  ISO9660  filenames to include all 7-bit
    ASCII characters except lowercase letters. This violates the ISO9660
    standard, but it happens  to  work  on many systems.  Use with
    caution.