Xiaopei's DokuWiki

These are the good times in your life,
so put on a smile and it'll be alright

User Tools

Site Tools


it:macosx

Mac OS X

tips

并安装 OS X)

  • 路由
    # 查看路由
     
    netstat –nr
     
    # 在Mac OSX 中, 设置路由的命令稍有不同, 为:
     
    route -n add defalut  10.13.31.1
    route -n add -net 10.0.0.0/8      10.13.31.1
    route -n add -net 210.32.0.0/20   10.13.31.1
    route -n add -net 222.205.0.0/17  10.13.31.1
     
    route add -host 54.81.143.201 -interface en0
     
     
    # 提示路由存在时可以通过下面方法删除后再添加
     
    route -n delete defalut  10.13.31.1
  • 结束、启动服务:sudo launchctl stop com.openssh.sshd
  • routenetstat -rn
  • lsof -ilsof -i -P | grep -i “listen”
  • 清理 DNS: dscacheutil -flushcache;sudo killall -HUP mDNSResponder
  • 解决 less(如 git log) 乱码:
    .profile
    export LESSCHARSET=utf-8
  • 移动硬盘分区格式化:
    • fat各平台都可用,但不支持4G以上的文件;
    • exFAT可在windows(XP 需要一个 3M 多的小补丁 KB955704)和 mac 间传输4G以上的文件, linux 若想支持 exfat 也需额外补丁

mac 用 ntfs 的移动硬盘可用 Paragon NTFS for MAC®,无缝体验,直接 finder copy

init

10.7: In Mail show messages you've sent in conversation

Go to Mail » Preferences » Viewing. Under View Conversations, check the Include related messages box. Conversation view is now complete. 1)

修改快捷键

禁用 Command + Q:

Microsoft Natural Ergonomic Keyboard 4000

softwares

omnigraffle

stencils

iterm

  • Preferences → Profiles → Terminal: 不勾 Set locale variables automatically
  • Preferences → Profiles → Keys: option key acts as+Esc
  • 使用 trigger 达到通知的目的:
    1. Preferences → Profiles → Advances → Triggers
    2. 增加一个如下的 trigger 2)
      Regular expression: ^kkk
      Action: Show Alert
      Parameters: attention!!
    3. 之后在运行耗时脚本时, 便可在脚本最后加 echo kkk, 以在运行后提示
      $ scp $FOO:a_large_file; echo kkk
    4. 效果如图
it/macosx.txt · Last modified: 2017/12/22 13:03 by admin