df is a great tool for checking the amount of free space on a disk (and the amount that’s taken). df has a number of options for ways to view the output and can even look at free iNodes and blocks rather than just showing free space. However, df is going to come up short if you’re hunting for where all your free space went within a given volume. For this, look to du. du is a great tool for checking disk utilization at more of a directory level. For example, the following command will show you how much space is being taken up by each application in the the…
-
-
Disabling Dashboard
The other day I saw someone remove the Dashboard icon from the Dock as a way of disabling it entirely. Probably not the best route. It’s pretty easy though. The command to disable: defaults write com.apple.dashboard mcx-disabled -boolean yes And of course if you’ve disabled, you might want to turn it back on using this handy-dandy double-negative: defaults write com.apple.dashboard mcx-disabled -boolean no
-
Managing Airport Settings from the Command Line
From time to time we will end up writing shell scripts that do a number of tasks with airport interfaces in Mac OS X, including automatically detecting networks and disabling the card based on TCP/IP settings/location, querying signal strength for positioning of WAPs and joining specific wireless networks. As such, a couple of commands keep coming up, since the airport card in a Mac can be controlled in a number of ways from the command line. First and foremost – it can be enabled and disabled using the networksetup command, located in /usr/sbin. The option to use with the command is -setairportpower which is boolean as on or off. So to…
-
Article on scripting networksetup for Xsan on Xsanity
Wondering why I’ve been a little light on Xsan postings? I posted an article on how to write a script to automate the setup of the Metadata and house networks in an Xsan environment on Xsanity. It uses networksetup for the most part and is meant to be a hybrid between a networksetup walkthrough and a mini-shell scripting tutorial. It can also be leveraged for scripting the initial setup of your clients in an imaging workflow, although you will typically not need to use static IP addresses in a mass deployment scenario.
-
Deja Vu
From xkcd.com, but seemingly the story of my life.
-
Mac OS X: Easy Find
Using the find command is a little weird to people who are used to using locate. However, it is far more powerful and doesn’t come with the indexing requirements that locate does. So, if you’ve been using locate try and get familiar with using something like this instead (looking for slapd.conf – you can change that as needed): find / -name “slapd.conf” -print
-
Mac OS X: Disable ACLs on External Volumes for Leopard
ACLs are great. They allow you a ton of additional options with permissions. But they’re not for everyone and they are enabled by default on all volumes in Leopard. But the following command can be used to disable ACLs on External volumes in Leopard: sudo fsaclctl -d -p /Volumes/<volume-name>
-
Mac OS X: Force LDAP Signing using dsconfigad
dsconfigad did not support signing of LDAP packets in 10.4.x. However, this was an upgrade that was introduced in the 10.5 version of the AD Plug-in. Provided that your Active Directory environment uses LDAP signing, a standard policy with DCs, you can mirror your settings on the DC in dsconfigad by using the -packetsigning option followed by either an allow, disable or require variable. To force LDAP signing, just run the following command: dsconfigad -packetsigning required To then disable signing if your environment doesn’t support it use the following command: dsconfigad -packetsigning disable The default variable is allow, which will use LDAP signing when possible.
-
Mac OS X for Unix Geeks
Today I received a copy of Mac OS X for Unix Geeks from O’Reilly, for which I was the technical editor on. Great read, especially for the *nix to Mac switcher. Check it out here: Big pat on the back to Brian Jepson, Ernest Rothman and Rich Rosen for releasing a great new version of their book!
-
Mac OS X: Disable fstab
To disable the fstab file for Mac OS X, open the /etc/fstab file and then comment out the following line: /- -static -nosuid