How to create dmg file in Centos through command line

廉价感情. 提交于 2019-12-12 01:31:24

问题


I want to create a dmg file of three files in centos . i am using hfsutils commands, but it is showing errors like "No known volumes; use `hmount' to introduce new volumes". I googled a lot to get clear steps for creating dmg. some one who knows these steps please post here


回答1:


Say if you want to create dmg of three files named file1,file2,file3.keep these three in one directory

Should run this command in the directory where we kept our three files

dd if=/dev/zero of="example.dmg" bs=1M count=10 hformat -l "example" ./"example.dmg"

A dmg file will be formed in our directory. next go to /usr/sbin from there run and then 1)hmount /directorypath/example.dmg 2)hcopy /directorypath/file1 example: 3)hcopy /directorypath/file2 example: 4)hcopy /directorypath/file3 example: 5)humount and then copy this file in to your mac system and open the dmg file,you will find all your three files in it.




回答2:


You can use this command:

genisoimage -D -V "Volume Label" -no-pad -r -apple -o <dest.dmg> <src>

Here is more.



来源:https://stackoverflow.com/questions/23910347/how-to-create-dmg-file-in-centos-through-command-line

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!