What happens when you type ls *.c
Linux ls command permit us displaying a list of the files and directories (folders) that are contained in a directory; if no directory is specified, the command will assume that we want the list of all the contents of the current directory. That is what happens when you write ls:
But… what to do if we only want to list files of a certain type? This is where the * comes into action. The asterisk is a character that will match any number of characters in a file name:
If you add an extension, you will be able to visualize only the files of that type. For example, this would happen if you wanted to see only the files ending in .c, regardless of the characters that appear before the extension.
As you can see, ls * .c lists all files in the current directory with extension .c