Thursday, February 14, 2019

Mac survival kit


  • ask different
  • fonctionalities
    • fn + F12.  go to dashboard (calendar, calculator)
  • about .bash_profile
  • MacOS (formerly OS X) is based on BSD Unix
  • list of installs made:
    • less /Library/Receipts/InstallHistory.plist
  • machine info
    • sysctl -n machdep.cpu.brand_string
    • system_profiler | grep Processor
    • system_profiler
  • updatedb
    • (base) lee@a8:~$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
    • (base) lee@a8:~$ sudo /usr/libexec/locate.updatedb
    • (base) lee@a8:~$ locate logs
  • install kdiff3
  • if you need to untar things like mvn, you can do so in /usr/local using sudo. Other folders are protected even using sudo 
  • colors
    • console and vi: 
      • go to terminal (console) / preferences / Profiles / Basic / ANSI Colors
      • change them
  • brew
    • brew list
    • brew doctor
    • brew services list
    • brew services info docker-machine 
    • brew services start tomcat
  • zsh
    • ps -ef,   htop prefered
    • sometimes buggy, switch to bash 
      • ex: find . |grep ".py"|xargs grep fill  (not working on my zsh)
    • this works on zsh but not on sh for big files
      • sort -u toto.txt > out.txt
  • network (use bash)
    • tcpdump -n -A -p -i lo0 host 127.0.0.1 > tmp.txt


.

Tuesday, February 5, 2019