1 00:00:06,639 --> 00:00:08,470 This video will talk about more and less. 2 00:00:09,349 --> 00:00:12,310 So do you need more or do you need less? 3 00:00:13,169 --> 00:00:15,000 More was the original file pager. 4 00:00:15,660 --> 00:00:19,890 We call it a file pager because it allows you to read the text file page by page. 5 00:00:21,050 --> 00:00:24,910 Now, in Linux, the latch utility was developed to offer some more features. 6 00:00:25,579 --> 00:00:28,460 And as a reaction to that, More was developed a bit more. 7 00:00:29,339 --> 00:00:31,320 But still, you can do more with less. 8 00:00:32,240 --> 00:00:39,119 Does it make sense? It absolutely does. Less is the default pager file in Linux. Let's do a quick demo. 9 00:00:41,340 --> 00:00:45,310 So I'm going to use sudo less on var log messages. 10 00:00:45,810 --> 00:00:51,200 If you're on Ubuntu, you need to use sudo less on var log syslog because they don't have messages. 11 00:00:51,880 --> 00:00:57,950 Now I am going to do what? Well, I'm going to scroll down, scroll forward a little 12 00:00:57,950 --> 00:01:04,019 bit and hey, I want to know if there's anything about ssh. So I'm using ssh. 13 00:01:05,900 --> 00:01:08,200 And look at that. Messages about ssh. 14 00:01:08,739 --> 00:01:13,426 That's how you can use less to scroll through a file. If you think that looks 15 00:01:13,426 --> 00:01:18,113 familiar. Yeah, there's a reason for it, and that is because man and Less are based 16 00:01:18,113 --> 00:01:22,799 on the same backend. You could say that man is built on top of Less. 17 00:01:23,060 --> 00:01:26,260 So the same key sequences apply, like Q to quit. 18 00:01:27,250 --> 00:01:31,210 Now, one more thing about less, and that's more. 19 00:01:31,210 --> 00:01:35,170 Let's use sudo more on var log messages. 20 00:01:36,329 --> 00:01:42,310 There. I'm using spacebar to scroll down and I'm using the arrow key to scroll up. 21 00:01:43,310 --> 00:01:45,859 That is one of the things that more couldn't do in the beginning. 22 00:01:46,480 --> 00:01:50,489 Earlier versions of More, you could only go down. That's why it's called more. 23 00:01:51,170 --> 00:01:55,049 It could only show you more of the fell. It couldn't show you less of the fell. 24 00:01:55,549 --> 00:02:00,234 And when I say that More is doing a little bit more than in the 25 00:02:00,234 --> 00:02:04,920 days before. Well, it's mainly about the option to scroll up in your file. 26 00:02:05,700 --> 00:02:09,735 But in the end, more and Less are pretty much the same. More or less, use 27 00:02:09,735 --> 00:02:13,770 cue to get out of here and let's have a look at the next video.