Create a case sensitive disk image on macOS: Difference between revisions
#macOS // Edit via Wikitext Extension for VSCode |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 8: | Line 8: | ||
$ ln -s /Volumes/Projects/projects/ ~/projects | $ ln -s /Volumes/Projects/projects/ ~/projects | ||
what happened? | |||
what happened? | |||
- I created a new disk image with case sensitive filesystem. The type is ‘spare’ which means it will automatically grow when needed, but initially it will take only 50mb on disk. | - I created a new disk image with case sensitive filesystem. The type is ‘spare’ which means it will automatically grow when needed, but initially it will take only 50mb on disk. | ||
- I mounted the image | - I mounted the image | ||
- I hide it on the desktop (This volume will be always mounted, so I don’t want to see the icon of it) – for this I set the invisible attibute with setfile, and restarted Finder | - I hide it on the desktop (This volume will be always mounted, so I don’t want to see the icon of it) – for this I set the invisible attibute with setfile, and restarted Finder | ||
- And finally I created the projects folder inside the volume, and linked it into my home directory. | - And finally I created the projects folder inside the volume, and linked it into my home directory. | ||
[[Category:Blog]] |
Latest revision as of 02:10, 19 March 2022
I need a 'Case-Sensitive' location on macOS.
$ hdiutil create -size 30g -type SPARSE -fs 'Case-sensitive APFS' -volname Projects ~/Projects.dmg $ hdiutil attach ~/Projects.dmg.sparseimage $ sudo setfile -a V /Volumes/Projects/ $ killall Finder $ mkdir /Volumes/Projects/projects/ $ ln -s /Volumes/Projects/projects/ ~/projects
what happened?
- I created a new disk image with case sensitive filesystem. The type is ‘spare’ which means it will automatically grow when needed, but initially it will take only 50mb on disk.
- I mounted the image
- I hide it on the desktop (This volume will be always mounted, so I don’t want to see the icon of it) – for this I set the invisible attibute with setfile, and restarted Finder
- And finally I created the projects folder inside the volume, and linked it into my home directory.