Mac下的readlink沒有-f參數,諸如screenfetch又會去調用readlink -f,因而每次都會出現:php
readlink: illegal option -- f
usage: readlink [-n] [file ...]
非常煩人,解決方案以下:
1.安裝coreutils:html
brew install coreutils
2.設置環境變量,編輯~/.bash_profile,添加:ruby
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
3.建立別名,使用greadlink替代readlink,一樣是編輯~/.bash_profile,添加:bash
alias readlink=greadlink