What happens when you type ls *.c

Before explain what does “ ls *.c”, i want to explain what is the command “ls”.

The command “ls” list all folders and files in the current directory, this is the basic command without parameters.

It is really practical in a common basis, when you want to know what files & folder there in your current directory, you just need to put this command in shell, it’ll display all theses files and folder for you.

But the command “ls” can be used more specifically like in the title, with this syntax “ls *.c”, so now we know what “ls” does, i want to know what does the “*.c” with the command ls.

So the “*.c”, will tell to the command “ls” to display only all files & folders that has the extension “.c” at the end.

So this what the command does, you can add more parameters and filter than that but i will not explain other ways today.

Stay tuned.