image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
Thread Tools
  #1  
Old October 1st, 2005, 03:44 AM
Viro's Avatar
Registered User
 
Join Date: Nov 2003
Location: Oxford, UK
Posts: 2,490
Thanks: 0
Thanked 1 Time in 1 Post
Viro will become famous soon enoughViro will become famous soon enough
Uncompress .bin and mount .dmg from commandline

Anyone know how I go about uncompressing a .dmg.bin image and then mounting that image from the commandline in OS X?
Reply With Quote
  #2  
Old October 1st, 2005, 09:56 AM
spb spb is offline
Registered User
 
Join Date: Dec 2004
Posts: 138
Thanks: 0
Thanked 0 Times in 0 Posts
spb is on a distinguished road
I'm not certain about the uncompression, but you can mound dmg with

hdiutil mount /path/to/file/filename.dmg

This will mount the dmg to /Volumes/filename/

There is a PERL module for working with hexbin files at:

http://search.cpan.org/~eryq/Convert...vert/BinHex.pm

This might be a place to start if you want to make a nice PERL script to do both the uncompression and mounting.

Last edited by spb; October 1st, 2005 at 10:01 AM. Reason: include binhex comment
Reply With Quote
  #3  
Old October 1st, 2005, 05:16 PM
Registered User
 
Join Date: May 2005
Posts: 1,339
Thanks: 0
Thanked 1 Time in 1 Post
barhar is on a distinguished road
Also, with reference to '.dmg' files (and running MacOS X 10.4 - 'Tiger') ...

hdid path_to_.dmg_file <return>
Reply With Quote
  #4  
Old October 1st, 2005, 09:47 PM
ElDiabloConCaca's Avatar
U.S.D.A. Prime
 
Join Date: Aug 2001
Location: San Antonio, Texas
Posts: 9,925
Thanks: 2
Thanked 63 Times in 59 Posts
ElDiabloConCaca has a spectacular aura aboutElDiabloConCaca has a spectacular aura aboutElDiabloConCaca has a spectacular aura about
StuffIt Deluxe can expand .bin files, and inclues two command-line StuffIt utilities located in /usr/local/bin: stuff and unstuff.
__________________
Power Macintosh G4/500MHz "Yikes!" 10.4.11 Server • 1024MB • 3 x 120GB + 320GB • DVR-111D • 2 x Radeon 7000 PCI • 2 x 17" CRT
MacBook 2.0GHz Core 2 Duo - White 10.5.5 • 2048MB • 80GB • CD-RW/DVD-ROM
iPod Photo 60GB • iPod nano 1GB • AT&T DSL 6Mb/768k
http://www.jeffhoppe.com
Reply With Quote
  #5  
Old October 2nd, 2005, 10:02 PM
Registered User
 
Join Date: May 2005
Posts: 1,339
Thanks: 0
Thanked 1 Time in 1 Post
barhar is on a distinguished road
Thanks ElDiabloConCaca for the 'unstuff' information.

With 'unstuff' (as the result of installing 'StuffIt Deluxe' version 9) in '/usr/local/sbin/' and 'unstuff -F' <return> entered, the formats supported by 'unstuff' were displayed. They are ...

apple, arc, arj, bin, btoa, bz2, cab, compress, cpt, double, freeze, gz, hqx, lha, mime, pack, pf, rar, sco, sit, sit5, sitseg, sitx, tar, uu, yenc, and zip

... Thus, to decompress 'InstallerUpdate1.0.dmg.bin' and then mount the '.dmg' file - if on the current_user's 'Desktop', one would enter ...

/usr/local/bin/unstuff /Users/current_user/Desktop/InstallerUpdate1.0.dmg.bin; hdid /Users/current_user/Desktop/InstallerUpdate1.0.dmg

..., as one example.
Reply With Quote
  #6  
Old October 3rd, 2005, 01:39 AM
Viro's Avatar
Registered User
 
Join Date: Nov 2003
Location: Oxford, UK
Posts: 2,490
Thanks: 0
Thanked 1 Time in 1 Post
Viro will become famous soon enoughViro will become famous soon enough
Cool. Thanks guys.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 11:35 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.