commands ls and ls -C seem to produce the same results - display by columns.
Is there any difference?
commands ls and ls -C seem to produce the same results - display by columns.
Is there any difference?
Referring to info coreutils 'ls invocation':
-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.
TL;DR: no, no difference - that's default.
read the output of alias
your ls command is in probably doing ls -CF.
It may be set in your bash_rc file too.
so ls -F will also give the same output.
but you could change it, in which case, you might want it. OR you could use it in a script, and maybe you want that style of output.