In the man pages it says:
-C list entries by columns
However, I really cannot notice any difference between the output of
ls -C, could someone explain this to me?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
To add what @muru said in the comments; have a look at
info coreutils ls
`-C' `--format=vertical' List files in columns, sorted vertically. This is the default for `ls' if standard output is a terminal. It is always the default for the `dir' program. GNU `ls' uses variable width columns to display as many files as possible in the fewest lines.
I take this to mean
-C exists specifically for the case where you redirect or pipe the output and want to preserve columnation. Otherwise ls will switch to
ls -1 when it detects that it's not displaying to a terminal.