Can someone tell me what terminal command the alias ll
is for? All I can find online is many people saying that it is an alias for ls -l
or ls -la
or ls -ltr
. But that's simply wrong. The result looks different. Is there any way to locate ll
and look at its syntax?
You can use the
alias
ortype
commands to check what a specific alias means:Note however that aliases might use other aliases, so you might have to check it recursively, e.g. in the case of
ll
, you should also check thels
command it calls:So
ll
actually means:ll
is an alias defined in your~/.bashrc
, provided you didn't change it it'sls -alF
:These three options are:
As
shows,
ls
itself is again an alias forls --color=auto
:You can look in your ~/.bashrc (or some file where your aliases are) or you can write some of these commands in your shell:
But why use find without the -name ".*" ? Cause you can put this in your .bashrc
Since "ll" it's an alias, it's not necesary that have just one meaning (ll='ls -alF --color'), you can alias your "ll" like another comand like, i don't know, "rm". I think it's more a convention (product of common uses).
But "ll" could be a program stored in any folder of your PATH. For example, if you have a folder named "bin" in your home, make a "ll" script that contains something like
But, what if your PATH have been altered to add another folder that contains the new "ll" command? For more interesting information, you can consult the following link to a related question.
There is no need to parse ~/.bashrc or any other script. You can check your current values of all aliases typing
alias
command in terminal. It will bring all defined aliases with their definitions onto your screen.It should be
ls -la
. See Linuxize.com: https://linuxize.com/post/how-to-create-bash-aliases/