2 Answers
2

-C

-C makes ls print output in column form. When stdout is a terminal (rather than being redirected to a file or non-terminal device, or piped to another command), -C is implied. So running ls -C is the same as running ls. But they are not equivalent when ls is redirected or piped. For example:

In contrast, ls -C (or -l) outputs in column form regardless of what kind of device stdout is. ls -C | less looks like the top output (but paged by less, of course).

-F

The main visible difference between ls and l is due to the -F flag, which causes ls to append symbolic suffixes (called indicators) to the entries it displays. These indicators identify what kind of file or directory they are.

In conclusion, l (ls -CF) is similar to but not the same as ls.

It's also good to keep in mind:

The same text can be both a regular command and an alias.

This is commonly used to specify options that are widely considered both highly useful and harmless, such as automatic colorization (where color is applied when stdout is unredirected or is a terminal, so the escape codes specifying colors are virtually guaranteed not to be misinterpreted).

By this principle, ls is itself an alias.

ek@Kip:/$ alias ls
alias ls='ls --color=auto'

So what command really gets executed when you run l? This one:

/bin/ls --color=auto -CF

The shell (bash) resolves commands that don't contain a / to the first match appearing in PATH, which in Ubuntu for ls is /bin/ls.

Aliases can contain aliases. Alias resolution is not recursive (an alias cannot call itself, though it can call a regular command that has the same name). But it does support nesting.

@Alison l and plain ls are not the same--they just happened to produce the same output for those particular files, since none were directories, executable, symlinks, or device nodes (and standard output was a terminal).
–
Eliah KaganFeb 3 '13 at 12:58