What happens when you type ls *.c in the command line?
what is the Unix command to list all the files in your current directory?

what is ls?
It’s short for the word list [ls] it lists files and directories. If the pathname is a file, ls displays information on the file according to the requested options. If the pathname is a directory, ls displays information on the files and subdirectories therein. You may obtain information on a directory itself using the -d option.

what is ls * ?
if ls
is being passed an argument called *
, it will look for a file or directory called *
in the current directory and list it just like any other. ls
doesn't treat the *
character in any other way than any other one.

what is .c ?
A file with the .C file extension is a plain text C/C++ Source Code file. It can both hold an entire program’s source code in the C or C++ programming language as well as be referenced by other files from within a C project.
So what does ls *.c does ?
it simply shows you every .c file