Spacer http://macenterprise.org MacResource.org - Mac OS X enterprise deployment project Spacer
Site Map Contact Us Top Background
 
Search
 
 
Send UNIX Command Scripts - One-Liners E-mail
Written by Steve Hayman     
Tuesday, 07 December 2004

One-Liners - Simple Scripts

Here are a few simple commands that you may find useful. They're hardly worth saving, you can just retype these as needed.

uptime

Shows how long all the selected computers have been up. Produces only one line of output, so this one looks good in the resulting table without you having to select "Display all output."

date

A nice sanity check to see if any of the clocks on your machines are out of sync. Also produces only one line of output.

periodic weekly

Run, right now, all the system maintenance commands which normally run via cron only at 4:30 on Saturday morning. To see the actual maintenance commands that are going to be executed, look in /etc/periodic/weekly. (You can also do "periodic daily" or "periodic monthly". )

diskutil repairPermissions /

Run Disk Utility's "Repair Permissions" feature on your root disk. This will take a while and produce many lines of output so be sure to check "display all output."

softwareupdate -l

Produce a list of all needed software updates.

dscl . -passwd /Users/admin newpass

Change the password on the local "admin" account.

systemsetup
networksetup

There is a lot you can do with these two tools, more than I can go into here. To see what the options are, use "systemsetup -help" and/or "networksetup -help". You may want to add /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support to your $PATH variable so you can type these commands directly in Terminal.app to try them out.

Last Updated ( Thursday, 09 December 2004 )
 
< Prev   Next >