Mac defaults to UNIX systems, and the UNIX system itself does not have these shorthand commands, so you can use them by setting aliases for the commands
View all command aliases that have been set on this computer: alias
Set command alias: Alias Ll= ' Ls-alf '
The execution command is valid only in the current shell, and can be set in the user's. Bash_profile for long-term use, so that each login can be used with these shorthand commands.
Steps:
1.vim ~/.bash_profile
2. Write the following to the file and save
Alias Ll= ' Ls-alf '
Alias La= ' Ls-a '
Alias l= ' LS-CF '
3. Effective immediately this file: source ~/.bash_profile.
The relevant bash profile describes:
/etc/profile: This file sets the environment information for each user of the system, and the file is executed when the user logs on for the first time.
and collect the shell settings from the configuration file of the/ETC/PROFILE.D directory.
/ETC/BASHRC: Executes this file for each user running the bash shell. When the bash shell is opened, the file is read.
~/.bash_profile: Each user can use this file to enter shell information dedicated to their own use, when the user logs on, the
The file is only executed once! By default, he sets some environment variables to execute the user's. bashrc file.
~/.BASHRC: This file contains bash information dedicated to your bash shell, and when you log in and each time you open a new shell, the
The file is read.
~/.bash_logout: Executes the file each time it exits the system (exiting the bash shell).
Mac ll, L, LA, and other shorthand commands cannot be used