I can remotely connect the xserv running tiger through ssh. How can I unpack and install a downloaded .dmg file at the command line?
Jun
Hi Jun -
My name is Brian and thanks for using macosx.com.
If I understand you correctly, you have a .dmg file (a disk image file) on a remote server you wish to download and then mount, but using only the command line. So, first of all, since you can connect to the server with 'ssh', you can also copy files to and from that server with 'scp'. So instead of connecting with ssh you can use the same username and password for scp instead. For example:
scp
username@xserv:/path/to/data/file.dmg ./file.dmg
(substituting your username, the name of your remote server, and the full path and filename of course). You'll get prompted for your ssh password, and then the file will be downloaded and your connection will be closed automatically afterwards. Then you can mount this .dmg file such that it appears on your desktop (and also is accessable via the command line in the /Volumes folder) with the following command:
hdiutil attach ./file.dmg
The command will mount the disk image for you, and then report back it's path in the /Volumes directory. When you're done with it, either drag it to the trash as usual, or you can type:
hdiutil detach /Volumes/SomeVolume
(where SomeVolume will be the directory reported by the 'hdiutil attach' command).
I hope this helps!
--------
Brian S.
MacOSX.com Technical Support
brian@macosx.com
Hi Jun -
Glad to help. Well since you can see the .mpkg files all you need to do is install them! For this you can use the "installer" command which has lots of options (you can see them with "installer -help" or in even more gruesome detail with "man installer". Basic operation though is simple enough:
installer -pkg ./XcodeTools.mpkg -target /
This assumes you want it installed on your main (boot) partition. The final argument is the target mount point which you'd only change if you're installing the package somewhere other than your boot partition.
--------
Brian S.
MacOSX.com Technical Support
brian@macosx.com
Thank you Brian! It's all done as you described.
Jun
Hi Jun -
As per your feedback, I'm attaching instructions from a site moderator here at macosx.com on how to view closed tickets.
Quote:
If she/he logs in into site, then clicks on Free Mac Support, she/he will see her questions, etc.
If she/he still gets that message have her/him go here: http://www.macosx.com/contact/
The site support team will help her/him out.
|
I hope this helps.
Thanks again for choosing macosx.com!
--------
Brian S.
MacOSX.com Technical Support
brian@macosx.com