HFS 形式で USB メモリをフォーマットする
売られている USB メモリは FAT や exFAT でフォーマットされていることが多くて、パーミッションやらが保存されないので JHFSX (Case-sensitive Journaled HFS+) でフォーマットしたかった。
(*'-') < man diskutil ... eraseDisk format name [APM[Format] | MBR[Format] | GPT[Format]] device Erase an existing disk, removing all volumes and writing out a new partitioning scheme containing one new empty file system volume. If the partitioning scheme is not specified, then an appropriate one for the cur- rent machine is chosen. Format is discussed below in the section for the partitionDisk verb. Ownership of the affected disk is required. ... e.g.) diskutil eraseDisk JHFSX Sony_16GU /dev/disk2