Xem xét việc cài đặt brewvà sử dụng phiên bản GNU của ls và các công cụ khác.
Cài đặt XCode từ AppStore.
Cài đặt Homebrew ...
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Cài đặt coreutils ...
brew install coreutils
Thêm vào dưới cùng của .profile...
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"
Bí danh tôi lstrong tôi .profileđể làm màu sắc cho tất cả mọi thứ và một phím tắt cho danh sách đầy đủ.
alias ls='ls --color'
alias l='ls -lah'
# -l use a long listing format
# -a do not ignore entries starting with .
# -h with -l and/or -s, print human readable sizes (e.g., 1K 234M 2G)
Có một loạt các LS_COLORStùy chọn trên github .