Solution: How to resize dmg file on Mac

I like to create dmg file on Mac, so I can put all the related documents in the dmg file, because we can mount the dmg file as a driver.

Solution: How to resize dmg file on Mac

I like to create dmg file on Mac, so I can put all the related documents in the dmg file, because we can mount the dmg file as a driver.

But if the size of dmg file is not big enough, then we need to extend the size of the dmg file, we can use the following command to resize the dmg file.

For example I have a dmg file named work-2023.dmg , which has a size of 1G, and I want to changed it to 10G , then the resize command is like below:

cd PATH_OF_DMG_FILE_DIR 
hdiutil resize -size 10G work-2023.dmg