July 2012 Archives

handy OS X command line tricks

| No Comments | No TrackBacks

apparently, this is the only photo i have of a computer!

There's nothing secret or new about the following list, and a lot of it pulls from unix.  It's certainly not all encompassing!  If I can remember to, I'll keep updating this entry with the nifty bits.  Also, its really hard to remember these, without needing to use them!  If you're really into apple secrets, check out secrets! 

Use 'serial' to connect a usb/serial ftdi modem etc...:  screen /dev/tty.YOURDEVICE BAUD ...substitute BAUD with, well, the baud rate and YOURDEVICE, with what you find using: ls /dev/tty.*

use 'nc' aka netcat to send/receive tcp/udp commands
i.e. nc -u 192.168.1.55 700 

Forgot to sudo and got denied?  Simply hit 'sudo !!' 

'pmset -g' lists you the power management settings, and pmset can change them all

need to make a user admin over the terminal?: 
sudo dseditgroup -o edit -a usernametoadd -t user admin 
sudo dseditgroup -o edit -a usernametoadd -t user wheel

use 'top' to see more than 'ps'

'crontab -e' well, kinda obvious...

osx version?  'sw_vers' will give you a little, 'system_profiler' all of it

want to read only the last 20 lines of a log file?: 'tail -c 20 system.log'
read xkcd? 'open http://uni.xkcd.com/' ;)

need to invent an admin?  Use single-user mode and:
    /sbin/fsck -y
    /sbin/mount -uaw
    rm /var/db/.AppleSetupDone
    reboot
    ...this let's you own, really any os x machine, though its not fun to go through the apple welcome stuff again...

    how much battery is left? 'ioreg -l | grep Capacity'
    ioreg has a plethora of info and is worth running without the pipe.   If you need to find out any other peripheral info in ioreg, you can change the grep option.

    i'll add more soon!
    Enhanced by Zemanta

    ...eventually, these lights program you!

    A max/msp project listing has been created here.  It gives a quickie description of how the attraction works.  The LED's pictured above are what illuminate the 1989 and 1906 alamo square skyline.  However, the photo does not give justice to their intensity.  I oft found myself siren-eyed from watching them pulsate!



    Enhanced by Zemanta

    About this Archive

    This page is an archive of entries from July 2012 listed from newest to oldest.

    June 2012 is the previous archive.

    August 2012 is the next archive.

    Find recent content on the main index or look in the archives to find all content.