 Today, we're going to be looking at different file types and their mean types. So you probably know, like if you have an image, it's going to be .jpeg or .png or .bmp. If you have a HTML file, it's going to be .html or .htm. And so forth and so on, .pdf, .mp4. But really, those extensions at the end, the . whatever, really means nothing to the computer for the most part. But that's there for you and me as a human to look at and know right away what type of file it is. There are some programs that, you know, look, it also helps you sort through files quickly based on file name. But really, different types of files embedded in them is a header that tells you what type of file they are. And I'm sure I've showed you before a program called File, which is going to be built into your Linux systems. And you can do so, for example, I'm going to say File 1.zip and it tells me that that's a zip file. If I was to move that 1.zip file to just be 1. Now I can still file 1 and it knows that it is still a zip archive, even though it doesn't have .zip at the end. I can move that 1 to 2.pdf and if I file 2.pdf, it still knows that it's a zip archive. The computer knows what type of file it is because it's that type of file. The extension means nothing or very little at least. Let me move that back to 1.zip originally. Yeah, go ahead and clear the screen here. So again, that's the file command and you can give it multiple things. I've created a number of files in here all named 1.something. And if I hit enter here, it's going to tell you the name of the file and then what type of file it is. And again, it doesn't matter what the extension is, it knows what file it is by looking at the header. You know, an exception to this might be text files because you have different script files and they're all plain text. That's why you put a shebang line in scripts, which is something that a lot of people don't do, especially with bash scripts, which is very annoying when they don't. And that's needed for when you run the script so the system knows what interpreter to use. But that's a whole other topic. Well, we know now that this really is a JPEG file. This really is a PNG file or PDF file. This is really a PNG file and a zip file. But sometimes when you're working with applications, you need to know the meme type. I believe that's how you say it. It's not meme like, you know, the images that you see online. It's, well, for example, this is used a lot, especially in everything. But when you're working with different files in emails or on websites, you got to tell it this type of file. If you're uploading a file to a website, it's going to check, is this really this type of file? Because when you're allowing people to upload stuff to your server, you want to restrict what files they upload. You want to make sure they're really uploading an image file if you're allowing it to upload an image file. You don't want them to create a program, a binary or a script and name it .jpeg and allow them to upload it and also that script somehow through a flaw in your system runs. So you actually want to check the file type. And sometimes you need to know that file type not only for checking it, but for when you're submitting stuff. So let's go ahead and how do you do that? Well, you use the file command again. So let's run that same command. But this time we're going to go dash dash meme dash type and you hit enter. And now you can see that it gives us the meme type and usually it's, you know, a general term. So image. So both the PNG and the JPEG are image, but then it's slash what type of file it is more specifically. So let's say we just wanted to get the meme type of one dot JPEG here. We got that. And again, it gives us the file name there. I'm not sure if a file has an option to not display the file name, but I'm just going to quickly pipe that into Ock because this is how I normally would do this. And I'm going to print dollar sign to meaning print the second column. And there we go. We have the file type for the file meme type for that file. And that's going to become important in a video that I have coming up where we're going to be submitting files to a website. And when you submit it, you have to let know what type of file type it is. So we can grab that file type for submission to the server with our shell scripts. So I hope you found that useful. And if not, hopefully you will when we get to that tutorial on Sming to the website. I do. Thank you for watching. Please visit films by Chris dot com. That's Chris the K link in description stuff. I say at the end of every video mob. You probably have clicked off this video already. Thank you for those who have stuck around and you know, you know, check out the links in the description. Patreon support and PayPal support is greatly appreciated. The more support I get through that, the more videos I will do. I am, I do have some time now in here at the end of the year, November, December, I'm trying to pump out more videos. But after the new year, I probably will cut back to, you know, maybe one a week at the most. Really, on my Patreon page, I think I've set a goal of basically, I'll do one video a week once we hit a certain goal. And we've never hit that. And I still have pretty much always done at least one video a week, if not more. But I'm really trying to encourage people, you know, for me, I'm so busy, two kids and a full-time job that I work many, many hours as a firefighter. It's hard to set aside time to make these videos. I have an injury right now. Not that that's your problem. That's why I have time. I'm actually off work for a couple of weeks because of an injury. And that's why I'm able to pump out some more of these videos. But once I'm back to work, it's hard for me to justify time to make as many videos as I'm trying to make right now in my off time. So if you want to see more, it helps me justify the time if I have that financial support. I've asked in the past and people have told me, you know what, just cut back on the videos, which really wasn't the response I was looking for. I was actually hoping for more support so I can justify putting in more time here so I don't have to do other things. Anyway, I don't want to go on and on about that. I just wanted to explain why I'm doing more videos right now, missing work a bit. And that's it. Thank you for watching. I hope that you have a great day.