Before we talk about what happens when you type the above command, we must first breakdown and understand the concepts in the command.
- ls — l
According to the English Wikipedia, A Unix shell is a command-line interpreter or shell that provides a command line user interface for Unix-like operating system. The shell is both an interactive command language and a scripting language, and is used by the operating system to control the execution of the system using she’ll scripts. (read more https://en.m.wikipedia.org/wiki/Unix_shell)
This is a unix command to list files and directories in the command line.
ls - l
This is a command to list files and directories in a long format on the command line.
This indicates that you want the command line to handle all files with the extension .c
From the explanations of the above unix commands, understanding the ‘ls -l *.c’ is made simple.
ls - l *.c
This command is to list all the files with the .c extension in a long format.