Tags

    ARD UNIX Commands

    Comments

    Task
    Open and Close a CD Tray drutil tray open
    drutil tray close
    Repair Permissions of drive diskutil repairPermissions /
    Retrive SMART Drive Status diskutil info disk0 | grep SMART
    Run "daily" script periodic daily
    Run as "root" user
    Run "weekly" script periodic weekly
    Run as "root" user
    Run "monthly" script periodic monthly
    Run as "root" user
    Update Prebindings update_prebinding -root / -force
    Run as "root" user
    Set System Volume osascript -e "set volume 100" - Options are from 0 to 100
    osascript -e "set output muted true" - changes the muted stats
    osascript -e "set volume output volume 80 muted false" - you can combine options
    Check Battery Cycle Count ioreg -l | grep Capacity - 10.3.8 or higher
    networksetup networksetup -help
    systemsetup systemsetup -help
    airport --scan /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport --scan
    airport --getinfo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport --getinfo
    airport --showstack /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport --showstack
    Spotlight Serach - 10.4+ only mdfind pdf - change "pdf" to the file extention you wish to find.
    Show a list of users who have logged in last
    Remote GUI login via Apple Remote Desktop: osascript -e 'tell application "System Events" to keystroke "LOGIN_NAME"'; \
    osascript -e 'tell application "System Events" to keystroke tab'; \
    osascript -e 'tell application "System Events" to delay 0.5'; \
    osascript -e 'tell application "System Events" to keystroke "PASSWORDHERE"'; \
    osascript -e 'tell application "System Events" to delay 0.5'; \
    osascript -e 'tell application "System Events" to keystroke return'

    Replace LOGIN_NAME and PASSWORD with the proper values
    Run as "root" user
    Change a local users password: dscl . -passwd /Users/user_name new_password
    Run as "root" user
    Run Software Updates Remotely softwareupdate -i -a
    Run as "root" user
    View all running applications osascript -e 'tell application "Finder" to get name of every process whose visible is true'
    Flush MCX Cache
    For 10.4.x
    rm -r /Library/Managed\ Preferences/*
    /System/Library/CoreServices/mcxd.app/Contents/Resources/MCXCacher -f
    Run as "root" user
    Flush MCX Cache
    For 10.2-10.3
    /usr/bin/nicl -t 127.0.0.1/local -delete /mcx_cache
    Run as "root" user
    Quit Application killall Application-Name