My very first blog post and it’s about the “ls” command!

Most likely at the moment, you are reading this article(my very first English, Medium, and tech topic blog post) I won’t be a first-week software engineer student, yes this is how we are learning how to do things on Holberton School. Not only start coding like there’s no tomorrow, but to see other ways to showcase ourselves as “complete” professionals. I wish I can do great and become a good software developer who serves and put his grain of sand to be this a better world.
Now, let’s start right away with our matter: What happens when you type ls *.c?
What is ls? what is *.c? where I am supposed to use these characters?
For context, we are working on a Linux environment, more specifically on a Shell. If you are non-familiar with these concepts don’t worry. Let me explain to you briefly what are those.
Linux: is a kind of operative system. Software that will allow you to communicate with your machine(Windows, Mac are also operating systems)
Why Linux and why we don’t just use Windows and Mac for all the things we have to do in our processes? that’s a good question. Linux is an operating system that allows us to see what’s happening in the “back” of all the processes. Sometimes we could get errors on Windows or we are limited to perform a specific task or automate some repetitive processes. With Linux, we don’t have those issues or limitations.
Ok, now that we know why Linux is so important let’s explain what is a Shell. A Shell is a program that interacts with the user and the machine. Yes, where we are going to tell the system what to do.
In Windows and Mac, we can use the mouse and the keyboard to let the computer know what do we want to do. On the Shell, we are going to use commands(or instructions let’s say) through characters(indeed: no mouse, no graphics, just keyboard). So, when we talk about “ls” we are talking about command with specific functionality(yes, is predetermined). “ls” will show us what a directory(or folder) contains. So for example, if we have a directory of pictures called “My_28th_birthday_party” (the underscores don’t mean anything, it’s just the name of the folder, period) and I use the command like this ls My_28th_birthday_party it will show me a list of all the pictures(files) which are located in that directory.
But wait a minute. You have around 350 pictures from that day and you just want to see a few of them. Let’s say(somehow) you want to look for the pictures with the file extension “.c”, you know, file extensions like .jpg, .png. stuff like that? well, let’s suppose you want to find pictures which finish with extension .c
easy: ls *.c My_28th_birthday_party
What the * does is to filter all the files ending with that file extension.
That’s it! if you didn’t know about it, now you can easily start learning about new commands and new ways of interacting with Linux. If you are already an expert and finished reading until this point, let me thank you! you are helping a potential software developer who is doing his best to become a useful professional for the society, to make this a better world! Feel free to comment or contact me at my twitter account: @andresgfranco