ELI8: ls *.c

First and foremost, why ELI8? I love when things are explained to me in a very easy to understand way, and oftentimes, when it comes to programming, the ELI5 method does the trick. And.. you didn’t read wrong. I’m going to go with “ELI8” because I will be covering some technicals and not just a simple explanation. Also copyright issues (but not really).
$ ls *.c
Above is a bash command. This is something you type out in a terminal. And, not to get too deep into what terminals are, just know they are a way to talk directly with your computer using only text. The “$” dollar sign is something that shows up usually on Apple computer terminals or Linux terminals. Just know that the “$” sign will be showing in front of each line you type into.
What we see in the command above are 2 very important things. The first important thing is:
$ ls
This is what we call a bash command. When you talk with the computer via the terminal, you can tell it a command and the computer will show you the results of your request.
This command will show you every file and folder in the current folder you are in. Just like when you click into a folder on your computer to see what is inside that folder, this command will do the same thing but directly using only text.
Why would anyone talk with their computer this way when you can simply click into any folders and files you want? Well, talking to a computer using bash commands can be much quicker, and there are times when you can’t find certain folders. There are oftentimes hidden folders and files, and there are also some really cool bash commands that can do some really powerful stuff; things that you normally can’t do by clicking around your computer.
The next important part of the command is the argument of the command. In our case, the argument means the file name we are looking for.
$ ls *.c
The argument in this case is very special. The * asterisk is a special character that means any number of characters. It can be zero characters long, or 100 characters long. It can be any letters, certain special characters, or numbers.
The “.c” at the end means that the file name must end with “.c”. So any of the following file names match what we are currently looking for:
this_file.c
HEYA.c
test123.c
a9b8cfadf98f0m1-fja11_djlkjadaa7.c
a.c
Cool, right?
So, our command ls *.c will tell the computer to show us all file names that end with .c in our current folder that we are in.