Difference between ls -l and ll?
I'm relatively new to programming as a whole and some tutorials have been telling me to use
ls -lto look at files in a directory and others have been saying
ll. I know that
lsis a short list, but is there a difference between the other two?
You may want to take a look at `which ll`. You will probably discover that `ll` is actually an alias for `ls -l`.
So then what is the difference between `ls` any other command I put into the shell? If I type `which ls` I get `alias ls='ls --color=auto' /bin/ls`, but if I type (for example) `which cd` I get `/usr/bin/which: no cd in (........)`. EDIT: I tried it again with `which mkdir` and I got `/bin/mkdir`. What is the distinction between these commands that some of them are stored(?) in `/usr/bin` and some are apparently not?
this is an affect of your distro's default `$PATH`. `ls` is very often aliased, so your shell reports the alias (which takes precedence over the binary) and the binary's actual location (in your case, `/bin/ls`). If `which` could not find `cd`, then something appears terribly wrong.
`cd` is a shell builtin keyword, not a program found in a filesystem. Use `type cd` and `type ls` to see what I mean. Some commands are simply overriden by shell builtins: `echo` exists in `/bin/echo`, but in `bash` and in fact most of modern shells, a builtin `echo` function is called instead (which usually has extended features). `type` actually tells you which one it is.
On many systems,
llis an alias of
$ type ll ll is aliased to `ls -l'
They are the same.