Merge pull request #82 from unixorn/show-how-to-create-encrypted-dmgs

Add examples for creating encrypted disk images as well
This commit is contained in:
Marcel Bischoff 2015-11-06 19:15:41 +01:00
commit b5e354625b

View File

@ -300,7 +300,17 @@ sudo fs_usage
#### Create Disk Image From Folder Contents #### Create Disk Image From Folder Contents
```bash ```bash
hdiutil create -volname "Volume Name" -srcfolder /path/to/Folder -ov diskimage.dmg hdiutil create -volname "Volume Name" -srcfolder /path/to/folder -ov diskimage.dmg
```
If you'd like to encrypt the disk image:
```bash
hdiutil create -encryption -stdinpass -volname "Volume Name" -srcfolder /path/to/folder -ov encrypted.dmg
```
By default, you'll be prompted for a password. You can automate that by piping in a password:
```bash
echo -n YourPassword | hdiutil create -encryption -stdinpass -volname "Volume Name" -srcfolder /path/to/folder -ov encrypted.dmg
``` ```
#### Burn Disk Images to DVD #### Burn Disk Images to DVD