• 2020-03-04
  • 2020-03-04

How to create the disk image file which is able to mount on APFS unsupported OS

The default file system of the macOS is changed to APFS since macOS High Sierra 10.13. The file system of the disk image file which is created by the Disk Utility had been changed to APFS also. They are not able to mount on earlier OS than macOS 10.13 which not supports APFS. This article how to create the disk image file with specify the file system. Creating the disk image file To create the disk image file, you can following way: Use the Disk Utility Use the hdiutil To specify the file system, use hdiutil to create the disk image file. Creating the disk image file with hdiutil To create the disk image file with hdiutil, enter the following line in the Terminal. The first argument is an action. The create specify create the disk image file. The -srcfolder option specify the source folder which contains files and folders are copied into the disk image. Above example specify the Test folder in the current directory. The -fs option specify the file system. The HFS+ is a default system which had been used until macOS 10.12. The last argument is a disk image file. Above example creates the Test.dmg file. The file system you […]

  • 2020-03-03
  • 2020-03-03

How to create the zip same as Finder creates, from the terminal or the shell script

Finder has a function create the zip file from the file or the folder. This zip file is different from the zip file Windows creates. This article says this zip file as Finder style zip file. You can create this zip file from the terminal and the shell script. You can create it in the automated script. This article explains that how to create the Finder style zip file and how to expand it. Creating the Finder style zip file You can create the Finder style zip file with ditto. Above line create the file by archiving the Test folder. -c option specify creates the archive, -k option specify compress with PKZip, --sequesterRsrc option create the __MACOSX folder to store the resource fork and the HFS meta data. Specify only one file If you create the zip file with only one file, --keepParent option may be an obstacle. For example, following line create the zip file by archiving the 123.jpg file in the desktop. Expand it, the Desktop folder will be created and the 123.jpg file is put in the created folder. Redundant folder will be created. --keepParent option put the Desktop folder which is a parent folder of the […]