 Hello, and welcome to this video by filmsbychrist.com. That's Chris the K. There's a link in the description. And in this little series, I'm just demonstrating a lot of commands real quickly. I have other videos that go into them more in depth. But I quickly just want to hit over some other very common shell commands that you might use. For example, LS will show you the files in your directory. I have none right now, so let's go ahead and get one. So I'm going to say WGet. And I'm going to WGet is to use to download files from the internet. So in this example, I'm going to download a file that we used in a previous video, a CSV file. So if I just say WGet and give it the URL of the link, verbally putting in quotations, because it can cause problems with some special characters and some URLs if you don't, we'll hit Enter. And it will download that file now if I LS. It will list that file. If I was to run that WGet command again, it's going to download the file again and put a dash 1 at the end there, signifying that it's a second copy of that same file. But real quick, if I was to WGet-C, it would actually continue to download. So if you're downloading something large and it stops, you can dash C to continue it. But if it's already been downloaded, it's just going to check and ignore it and says there's nothing to retrieve. So that way you don't get multiple files if you try downloading the same file more than once. WGet is a very, very common command. It's built into many, many systems. It's on your phone, probably on your TV, router. It's everywhere. Another command for downloading stuff that's very common is Curl, C-U-R-L, which is commonly installed, if not very easy to install on most systems. Works very similar. Some people would argue that Curl is more powerful. I usually use WGet just because it's more commonly found, especially on lighter weight systems. But if I was to use that same URL and say WGet, or sorry, say Curl and that URL, by default Curl doesn't display the file or doesn't download the file, it displays the file. So if you wanted to put it into a file, you could do dash o, and I'll just call this p.csv, just get a different file there. And now at downloading, I can say p.csv, the cat, and there it is. If you wanted WGet to display the file rather than download the file to and save it, we will say dash capital O. Now, for example, capital O is just the same as lowercase o for Curl. I could give it a file name. So example, if I wanted to download that file again, I can say dash O, and I can say, I'll just call this pp.csv, and now at downloading, but instead of saving it as people.csv, it saved it as pp.csv. But if you do capital O in a dash, and you can put a space there or not, that's saying standard output, which means it's going to display it to the screen. So that's two differences between Curl. Curl automatically displays it to the screen, and you have to tell if you want to save it. Curl automatically saves to file, or you can tell it to display it to the screen. So they both have opposite defaults in that aspect. Both give you a little counter, as you can see here, some output of what it was downloading and some output. If you didn't want that, with WGet, you can say lowercase q. So dash lowercase q, then O in what you want to output, and that means quiet. It won't give you that download progress bar. So that is useful there. So now we've looked at List, WGet, Curl. I talk about Fuzzy Finder, FZF, FZF in the last video, which once installed, when you're installing it, we'll ask you if you want to add, if you're using Bash or ZShell, if you want to add it to that for uses. And then once you do, you should be able to use Control-R to search through previous commands. So I hit Control-R, it starts listing my commands, and now I can start typing. It's going to go through my history, so I can type in test, and it brings up all my previous commands that have tests, or in this case, if I do WGet, it's going to bring up WGet commands, and so I can narrow it down, just like we were searching through a file previously, now it's searching through previous commands. So go ahead and give that a try. So FZF is useful that way. Again, there's also a Vim plugin. There's lots of FZF can do. In the title of this video, I wrote out that we're going to work at some commands. Date is another command, which shows you the current date and time. I can say plus percent capital Y for the year. I can do capital or lowercase D for the day of the month. I can do lowercase M for the month. If I do a capital M, it's the current minutes. If I do a capital H, it's the hours that we're currently in. If I do lowercase H, it's going to give me an abbreviated version of the month. So if you look at the man file, which almost every command you have installed should have a manual file. You just type in man and name of the command and you can come in here and you can see all the different options and down here, it gives you a great display of what each one of these little formats can do. And you can see there's a whole bunch of them to display the year, the date and time in different ways. If I cue to get out of that, I can go back up to something like where I had Y and then I can do dash percent M dash percent D. And now I've formatted your month day. I can go day and month. I can flip it around if I want. Instead of dashes, I can do slashes like so. So that's different ways to display the date. And a very common one I use is plus percent lowercase S, which gives you a epoch or UNIX timestamp, which is something, if you're logging stuff, you're gonna wanna log a timestamp and this is how you're gonna wanna do it. You can also log another format if you want, but this is easy to calculate, time between things, whether this happened before or after something, and you don't have to worry about time zones or daylight savings time. This, no matter where you are in the world, this is the timestamp and you can always convert it later on using the date command to other formats if you want. Also, as I was saying in the title of this video, I talked about different commands and at the end I said more. Well, I meant, I'm gonna show you these commands and more, but there actually is a more command. So I can cat out a file like our people.csv, which will just show the entire file. If I, instead of saying cat, I can say less people and now it's showing me the top of that file and I can use my arrow keys to scroll line by line up and down through this file. I can hit space bars, jump through, enter also goes line by line and then I hit Q to get out of that. So if a file is very large and I wanna read through it, I can use less, but you can also use more because more is less and it's a different command, but it works very similarly. The arrow keys don't work. You have to use enter to go down and space bar will jump page by page and so more, I usually use less, but there's actually also another one that you may not have installed. Those two are very commonly installed, but if you use most, you should be able to, I believe, most.csv. It's similar. You can use your arrows to go up and down, enter or space bar, Q to get out. There's also, you can hit H to get a help file. So, but what's, why would you use most? I don't normally use most, but I have it installed. Why do I have it installed? Because if you have it installed, it's one of the ways, if I did, again, we'll do the man.date. You can see my man page is somewhat highlighted. We got some things marked in red and that's because once you install most, it should start using it for your man pages and color codes it somewhat. There are other better ways to color code your man pages, but that's just a quick and easy way that I just did. I haven't set up anything else for that. So, that's less, more and most. Less and more are very commonly found on systems. Less is the one that I use most and it doesn't just have to be, like I said, we gave it a file, so people.csv, and again, now I can go through this, Q to get out of that, but it can also be piped into. So, cat, this is gonna seem like a similar thing because we're doing the same thing, but if you had some sort of output from another command, you can put it into lesson read it line by line. So, yeah, those are some common commands. And again, this video series is just demonstrating a lot of commands, just reviewing a lot of basic stuff quickly. If you went to my website, filmsbychrist.com, here you can search through my videos. So, you might be able to search for less, although a lot of videos probably have the word less in them, because they say things like less in. But for the most part, you can search through my videos fairly good here. More, but again, then more on multiple, yeah. So, those ones might be a little difficult to search for because their names are so common, but you can find a lot on my, here we go, head, tail and more. Oh, let's talk about head and tail. Those are also very common. So, we looked at less and more to scroll through files, but let's say I just wanna look at the top 10 lines of a file. I can say headpeople.csv in this case, and it's just gonna display the top 10 lines. If I just, and that's the default is 10, if I say dash n5, it's gonna show the top five lines. If you wanna see the top 50 lines, you can say 50, it'll show the top 50. And it's very common, I just want the top line, just one. And then if you wanna go the other way, instead of head, you can say tail. And tail, we can say people.csv, and that's gonna show the last 10 lines by default. But I can say I wanna see the last five lines. So, if you're appending to a log file, this is gonna show you the last five things in there. If you just want the very last thing in the file, you do one. And if you want, you can do more than that again, 10 is the default, but I can say, I can do 60 or 50 or whatever. So, head will show you the top of the file, tails will show you the bottom of the file. And you can tell how many lines you want. So, dash n for number of lines. And again, you can say man, tail, and here it will tell you other options you have, but those are the basic ones used. So, go ahead and says also C head because it's a similar program. It is part of the core utilities, so that is on pretty much every system, every Linux system unless it's a very, very, very lightweight. Also going back to FZF, I also wanna say that's not just for Linux, it is cross-platform. So, if you're on Windows, Mac, Linux, probably free BSD or any type of BSD, you can install up on that and it is a great, great tool. Anyway, I hope you enjoyed this video. Be sure to check out Films by Chris.com. The link is in the description of the video and as always, I hope that you have a great day.