How can I install the `ll` command on Mac OS X?
阿新 • • 發佈:2018-12-27
In OS X 10.9.5 since Mavericks (and at least up to El Capitan) you have to add an alias command to your .bash_profile file in your home folder:
~/.bash_profile
which is equivalent to your user path at
/Users/YOUR_USER_NAME/.bash_profile
To see that file in finder you have to activate the display of hidden files (e.g. using the app InVisible). Otherwise you can simply use your terminal to locate it and edit it with nano:
nano ~/.bash_profile
Then add an alias command to the end of that file. The standard ll alias would be
alias ll='ls -lG'
but I prefer
alias ll='ls -lGaf'
which also shows all hidden files (starting with a dot) and sorts the output case-insensitive.
Dont forget to restart your terminal app after the changes.