Hi this is Gary with MacMost.com.
Let's take a look at creating disk images using Disk Utility.
To create a disk image we're going to use the Disk Utility app.
Now you can find this by going to your Applications folder and then going into Utilities and there
is Disk Utility.
But of course the best way to do it is just Command space and search for disk utility
and run it that way.
So to create a new disk image you can use this new image button here at the top or go
to File, New, and Create a blank disk image.
Then you give it a name and save it just like a regular file to a location because a disk
image is in fact just a file inside that file instead of having say graphics or word processing
document or something like that you have a whole bunch of other files.
But you are going to see it just as a regular file and this is the file name.
This is different than the name down here which you will see when you mount the disk
image just call this one Test Disk Image and you will see that name appear later.
You can set a size for it and you can also set a format.
I would just leave it here for most uses.
You can also encrypt it and you can have a password and then this password can be used
to protect the files inside there.
This is great if you want to create a disk image to put a bunch of files in and then
email to somebody and you know it is protected.
Then you can also select different formats.
You can do the rewrite disk image here but you can also do a sparse disk image which
will shrink the file size to the minimum it needs.
It will still look like a 100 megabyte disk but the file itself will be a lot smaller.
So let's create this and it will put it out there.
At this point we're kind of done with using Disk Utility to create it and we want to actually
interact with it in the Finder.
We go back to the Finder window here and we will take a look and see under Devices that
Test Disk Image is actually here and it is empty.
We can actually put files in it.
Let me open up a second Finder window here and just grab a bunch of files and I'll put
it in there.
Notice it is going to copy them in because it is like this is a second disk drive.
Even though it is a disk drive on our main disk drive it is treated as a separate one
so automatically it is like copying to a USB flash drive or an external drive.
That's what I've got in here.
Now I can look under Documents and there is that file called Test.dmg.
You can see it is 100 MB in size even though I am not using all that space.
It will just be that size.
Okay, so now I've got the entire disk image here as a single file here in my Documents
folder.
If I look in the drive I've got all the stuff inside it.
I can hit the Eject button here and it goes away.
I still have the file, the single file, but I can't access the files inside it at all.
It just sits there like a single file which is one of the main reasons to use a disk image.
Say you have a project that has thousands of files and you're done with that project
and you are sick of seeing these show up in Spotlight and searches.
You're sick of having all these extra files in your drive and you just want to kind of
encapsulate the entire thing into a single file which you can put away in some sort of
archive.
You can create a disk image like this and put all the files in there.
To get into them I just double click on it is actually then going to mount that drive,
there it is, and I can get to those files again.
Since it is a read write image I can remove files, delete files, interact with it just
like it was an external drive that I had plugged into my Mac.
Notice that the name of the drive here on the left sidebar and here at the top is that
name that I entered in but not the final name.
Not Test.dmg which doesn't appear anywhere in the name of the drive.
It is almost like labeling a USB flash drive by writing on it.
That is not going to appear here in the Finder.
It is going to be the actual official name which I gave to it.
So let's go into Disk Utility now and see that there is another option.
You can actually create a disk image from a folder.
So this is a quick way of doing it.
I can select a folder, like say this folder with a bunch of pics, create an image and
I can save it out and in one step I've create this disk image here and when it is all finished
up I can go into my Documents folder, I can look at the Pics folder and you see that not
only did it create it very quickly but it made it the exact size it needed to be to
hold those files.
Now let's create a new disk image that is both going to be a sparse disk image and also
it is going to have encryption set.
I'll call it new image here and I'll call the file something similar.
You can see it is going to append .sparseimage as the extension.
I'll create it in the Documents folder there.
It is going to ask me for a password.
I'm going to assign a really weak password there and then I'm going to turn off remember
password in Keychain.
This is great to have turned on because it means you'll never have to enter the password
in again on your computer.
So you send this to someone else and they'll need to enter it in.
I'm going to turn it off just so I can demonstrate having to enter the password in.
It is going to create this new sparse image.
Now I stuck with 100 MB as the size for this sparse image.
So you can see there new image right there and I go in and you can see it still thinks
there is a 100 MB available.
I'm going to grab some files here and drag them in, right there.
So I've copied them in and now there is five items in there.
I'm going to then look at the Documents folder and you can in the Documents folder I've got
this NewImage and it is still pretty small because it will adjust in size.
I'm going to eject the NewImage drive so it is no longer mounted.
I can no longer access it in the Finder and then attempt to mount it again.
When I do that, double click on the file there, it is going to ask me for the password and
I don't have access until I enter the password in.
Not only is it password protected but it is important to realize it is encrypted which
means that the files simply are all garbled until you enter that key in which is the password.
So it makes it hard or almost impossible for somebody to get.
Great if I wanted to send these files encrypted to somebody else on a Mac who could then just
get this single file disk image and enter the password in and get access to these files.