You are on page 1of 5

asr

Apple Software Restore is used to clone and copy disk images onto volumes.
asr -source source -target target [options] asr -imagescan [-blockonly] image asr -h | -v

I use asr to blast an image (usually created with Mike Bombich s !!!" on to client computers. #his saves the time of running updates and installing software on each machine.
fw1:~ admin$ asr -source /Volumes/FirewireDiska/images/xclient1 asr!"mg -target /Volumes/#ntitle" -erase

nicl
$etInfo command line utility is a general%purpose utility for operating on $etInfo databases. #he nicl is a very useful tool& it can manipulate a raw .nidb when $etInfo is not running. So you can make changes to your nidb while booted into single user mode (like changing that Admin password you swore you d never forget'"

ni"ump
nidump reads the specified $etInfo domain and e(tracts te(t or flat%file%format data to standard output.
ni"ump [ -t ] $ -r "irectory | %ormat & "omain 'xample( )ue to a security flaw in *+., you could using nidump

to get a list of password hashes and then run them through a program (like -ohn the Ripper" and end up with access to any account in the $etInfo domain. If running *+., it would be a good idea to change the permissions on most of the $etInfo

manipulating tools.
ender:~ brad$ ni"ump passw" / ) */passwor"%ile

ni%in"
.ind a directory in the $etInfo hierarchy starting with the local domain and workings its way up to the root domain.
ni%in" [ -anvp ] [ -t timeout ] "irectory [ "omain ]

niloa"
/oad te(t or flat%file%format data into $etInfo database.
niloa" [ -v ] [ -" ] [ -m ] [ -p ] [ -t ] $ -r "irectory | %ormat &"omain

niutil
$etInfo 0tility lets you do reads and writes to your $etInfo database.

nireport
1rints out tables from the $etInfo database
nireport [ -t ] "omain "irectory [ property !!!]

l"apsearch
/)A1 search tool. As of *+.2& Mac is now using /)A1 for its client%server hierarchy in favor of $etInfo.

l"apcompare
/)A1 compare tool.

"itto
!opies files or directories to a destination directory. I find it useful with the %rsrc.3R4 flag which preservers resource forks and meta%data.
jane:~ brad$ "itto -rsrc source%ile copy%ile

+p,ac
!pMac comes with the developer tools. It copies files similar to cp but preserves forks and metadata. Man page warns that it will not copy files between volumes'
+p,ac [-rp] source target +p,ac [-rp] source !!! "irectory

,v,ac
Another one from the developer tools. Similar to mv command but preservers metadata and forks. Man page warns that it will not move files between volumes'
,v,ac source "irectory

sw vers
1rints the operating system& version number& and build number.
jane:~ brad$ /usr/bin/sw vers ProductName: Mac OS X ProductVersion: 10.3. !ui"dVersion: #$%3

so%twareup"ate
#he command line version of the Software 0pdate program found in System 1references.
-l /ists updates that have not been installed -i [args] will install the updates you list or use one of the

following5
-a .or all available updates -r .or all re6uired updates jane:~ brad$ su"o so%twareup"ate -i -r

system pro%iler
system7profiler gives information on hardware and software configuration and can create reports in plain te(t or 8M/ which can be opened with the System1rofiler.app

mount a%p
Mount afp sharepoints from the command line.
mount a%p [-i] [-o options] a%p url no"e

9(ample mounting an afp sharepoint5


ender:~ brad$ mk"ir /Volumes/mpender:~ brad$ mount a%p a%p(//bra"(./00123D4bean!plumblossom!org/mp- /Volumes/mp-

:hen I m finished5
ender:~ brad$ umount /Volumes/mp-

scutil
1rovides an interactive session with configd. I haven t really scratched the surface of yet so you might check the man page. 9(ample retrieving !omputer and Rende;vous name5
ender:~ brad$ scutil --get +omputer5ame ender:~ brad$ &nder ender:~ brad$ scutil --get 6ocal7ost5ame ender:~ brad$ &nder

/3D +omman" 6ine 8ools


Apple Remote )esktop comes with some great command line tools located on any machine running the AR) client program. #hey can be used to gather information or set many of the options available in the <0I version of AR).networksetup and systemsetup are located here5
' S(stem')ibrar('*oreSer+ices',emoteMana-ement'.,/.-ent.a00'*ontent s'Su00ort'

And kickstart is located here5


' S(stem')ibrar('*oreSer+ices',emoteMana-ement'.,/.-ent.a00'*ontent s',esources'

All the options provided are a bit too much for this page but you can get their version of a man page with the help flag5
brad10etra:~2 c" /0ystem/6ibrary/+ore0ervices/3emote,anagement//3D/gent!app /+ontents/0upport/ brad10etra:Su00ort2 networksetup -help | les

You might also like