Pages

Showing posts with label osx. Show all posts
Showing posts with label osx. Show all posts

June 24, 2013

Installing OS X Applications from the command line

1. SSH to the workstation
2. Mount the disk image (.dmg) file by using the hdiutil
     "hdiutil mount application.dmg"
3. Navigate to the folder that was mounted in the previous command. (Should be inside /Volumes)
     "cd /Volumes/application/"
4. Use the installer application to install the package
     "sudo installer -pkg application.pkg -target LocalSystem"
5. Unmount the disk image

     "hdiutil umount "/Volumes/application/"

May 27, 2013

Connecting to a wireless network from OS X command line.

Connecting to a wireless network from OS X command line.

The 'networksetup' utility is very powerful for making network changes to an OS X workstation. Below is the syntax for connecting a machine to a wireless network from the command line.

$networksetup -setairportnetwork Airport [router SSID] [password]



Additional Resources:
https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/networksetup.8.html

May 13, 2013

Hide or UnHide files or folders from OS X Finder

Hide or UnHide files or folders from OS X Finder


You can use the chflags command to make a file or folder invisible to the OS X GUI


To hide a file:
$ chflags hidden file.txt


To unhide a file
$ chflags nohidden file.txt

May 8, 2013

Use caffeinate to prevent OS X from sleeping

Use caffeinate to prevent OS X from sleeping

OS X Mountain Lion includes a new tool called Caffeinate to allow you to to prevent a machine from going to sleep.

To temporarily disable sleep:
 $caffeinate

To prevent the machine from sleeping for 4 hours
$caffeinate -t 144000


Additional Resources:
https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man8/caffeinate.8.html