Diff of UnixCommandsOSX


[[Unix commands(Solaris)]]
*Serial port handling(screen command) [#sce0d6ec]
 screen /dev/tty.usbserial-00006114 38300
 quit: Ctl+a, k
 detach: Ctl+a, d
 reattach: screen -r<RET>

~% more .screenrc ~
 logtstamp after 5
 logtstamp on
 logfile flush secs
 deflog on
 logfile "/Users/cbm/log/screen-%Y%m%d-%c%s.log"

*Show the libraries related to the command [#t509ded6]
 >otool -L /usr4/local/mac_bin2/pp<RET>
 'ldd' is available for solaris or linux.

*Show the architecture for the command [#k480a141]
 >lipo -i /usr4/local/mac_bin2/pp<RET>
 i386  :32bit application
 x86_64:64bit application

*Open a file browser for the current directory [#dec163ae]
 >open .<RET>

*Check the nfs server [#m20c2194]
 >showmount -e hebb<RET>

*Backup folder or update the backup [#cffa9b71]
 >rsync -av /usr1/uken /backup/<RET>
 Then it creates /backup/uken folder.(If you did it before, it'll update the backup)

*Start OSX application directly from the command line [#bdd6e8e0]
 Make alias for the application
 e.g.)
 alias prev 'open -a Preview'
 alias tw 'open -a TextWrangler'
 alias hex 'open -a /Applications/Editor/HexEdit\ Release-J/HexEdit.app'
 
 Then you can open "anat.hdr" by typing "hex anat.hdr<RET>".