4:47:02
2025-02-19 09:20:08
2:39
2025-02-19 21:55:33
4:40
2025-02-19 22:23:21
2:58
2025-02-19 23:09:29
20:58
2025-02-19 23:48:16
3:00
2025-02-20 05:21:32
2:29
2025-02-20 05:53:02
5:18
2025-02-20 06:35:37
4:07
2025-02-20 07:47:51
1:15:07
2025-02-20 09:31:43
1:28:23
2025-02-20 11:13:37
1:16:38
2025-02-20 13:43:10
Visit the Network Engineers Programme course recordings page
WEBVTT--> I like that I have to prove I am a human every time I come knocking and someone once said --> It's funny that robots are asking us to prove we are not robots. --> Isn't that true? It's a machine which is saying, hey, prove to me you're not a machine. --> So we'll just, you don't have to try this, but what I'm literally doing is just creating a file made out of nothing, but now I'm creating a file as you can see, 26 KB. --> I'm just overwriting anyways and now it's 2 MB and one more zero and now I have a 26 MB file created in my home directory. --> Okay, I can repeat that command. --> Give me a summary. --> Hopefully you can see if you execute the same that now you're taking more space in your file system. --> So nice handy command. Give me a summary which is human readable. --> Just careful with the spaces anytime on Linux. --> Careful with spaces. --> Does it work for you? You don't have to try this, but just showing you the output of TU-SH. --> Just with the file systems. --> Alright, so we're comfortable with --> Just some of these fundamental commands. Maybe I'll add to this. --> Good old ls. --> Which is the first command that we looked at just how to see what's in my file system in that particular location. Now ls has lots and lots of options. --> If I do dash dash help. --> I have plenty of options with ls. --> The one that we just tried first was ls minus l gave a long list was a little bit handy. --> We could see permissions. You can see some basic information, date, timestamps, the type of file all shows up there. --> There are many ways to do this. Give me the size. Give me the reverse order when I want to do some sort of sorting. --> T sort by time. --> And everyone has their own favorite ls command. For instance. --> We created a file. --> Earlier. --> Called as my file. What if I create a file with a dot in front of it? --> I take a list. --> And I really. --> I don't see it. --> It's there. You're going to see everything. --> You do ls minus a lucky. Give it a try. --> So with the minus a lot of things that have been hidden come out. --> So ls minus a kind of literally means all show me everything. What that means is if you create a file with a dot in front of it, it is hidden. --> The file system unless you see it with a minus. --> Assuming that works for everyone. Yes. So the lot of hidden files and for different purposes, but that's one if you just put a dot. --> Now comes one more very interesting thing. --> I create a file called as new backup. --> And now I need the folder. --> Would it let me create that folder? --> Yes, because one is a file and the other one is a. --> And what is the directory a type of? --> So back to my question. Would it let me create this folder? --> You cannot create a file and the folder with the same name in the same location. --> Because a folder is also a file. --> So this message is a bit confusing, isn't it? I cannot create a directory because a file exists. --> This hopefully now again gives us some understanding of the file system characteristics. --> Hidden files navigating around in the file system. --> The reference to parent directories and current directories and absolute paths and relative paths. --> The fact that multiple files and folders can exist with the same name. --> How do you know what mount points exists? --> How do I know what the size of my file system is? --> The folder so on and so forth. --> And again, commands like Alice have hundreds of options as well. --> So we have Alice, we have CD things that you've just done. --> The other thing that might be handy as you work on the system is again, just knowing who you are and where you are. --> So come on like ID is very useful. --> What is your user ID and what groups you belong to? --> Obviously determines your privileges. --> We saw the who am I. --> It says you are a student. --> That's the user that you have logged in as the current terminal. --> That's where your privileges are. --> In the terminal. --> To find out what's the current time, what do you type on the terminal? --> I type. --> I normally state. --> So time doesn't tell you time of the system. --> Time tells you the time it takes to complete some task. --> Yes. --> So I switch from my user to an application user. --> I run commands. --> I want to know who run those commands. --> So the short answer is I've understood your question. --> Let me prove that here. --> So what I'm going to do is I'm going to do pseudo bash. --> And I'm going to ask who am I? --> Right now what does it say who I am? --> Root. --> Now the way system accounting works, basically the way logging works. --> It's not just keeping track of this. --> It's also keeping track of the real user from which you switched. --> So right now who do I? --> How do I know what user I really, really am? --> Because right now I've just switched to a share, which has root privilege. --> So you say who am I? --> But this time you shout. --> This is shouting at the system. --> Then it says fine, you are student. --> Oh, OK. --> So if I were to search for this. --> So this is you trying to remember which user you looked at. --> Yes. --> So I guess you need to manipulate the command to. --> So now you have now you're looking for the commands. --> But it does let us know. --> I think in terms of what you're trying to do is simply called as auditing. --> And there is a system accounting that must be configured. --> And it will keep track of the real user. --> This these are none of this is auditing. --> None of this is accounting. --> What you need is a system level log file. --> That kind of does this in the Unix world. --> We used to do who do in the Linux and others. --> You just have to set up accounting to do that long. --> OK, then you can maintain that historic log. --> So just you guys try the same. --> The who am I and who am I. --> After you run the shell with root privileges. --> Just checking all of you are still with me. --> Yes, yes. --> Akana, are you around? Vinit? --> Yeah. --> All right. --> You're all network people. --> So I'm pinging you to see if there is a timeout. --> I'm looking for latency and if ICMP is coming back or not. --> When you ping, what is the ICMP type for equal request and equal reply? --> Is that a question? --> Yeah, it is. --> What is the question? --> When you ping, you're using the ICMP protocol. --> What is the exact type code for the equal request and equal reply? --> Code. --> Yeah. --> So it's a type zero and type eight. --> That's your equal request and equal response. --> I did my I started my career as a network engineer in 1994. --> Please change. --> Excuse me, 1994. --> Yes. --> We were waiting for our electricians. --> Besides, what kind of computers do you use? --> No, but you need some kind of computer. --> So I worked on IBM systems and OS tools at that time. --> We didn't use TCPIP protocol. --> It was IPX SPX on novel network, which was routable as well. --> We worked on MTA stacks, X 400 and X 500 for directory and communication. --> And then TCPIP kind of came later as the internet started to become more popular. --> They're like, what's this TCPIP thing? --> Nobody will use it. --> And then the rest is history. --> And the rest is us. --> Yeah. --> All right. --> There's a little bit of who am I just telling you who you have signed up as and in the system. --> What are you recognized? --> So that's just some basics. --> It's just nice to know in terms of the commands. --> Now, yes, since you're working on the file system, request us to kindly exit and come back to our home directory. --> Sorry. --> Yes. --> So in terms of how this is being set up. --> But if you're using your command to switch to root, then we definitely we're using bash. --> So within the terminal of the set up homes. --> But if we're using the commands, it switches to a completely new language. --> Yeah. --> Yeah. --> And that's where you add the dashboard so that you get the complete environment. --> Basically, all the not hidden files which contain a lot of configuration is loaded as well. --> Because I said, for example, maybe you can run the sudo space su dash or the sudo minus i. --> Then it drops you to a complete difference. --> Yeah, you're doing sudo su. --> It's the same thing here. --> It's just switching to root. --> The idea is we don't want to completely switch to another user. --> We can just restrict you for certain commands. --> That's where sudo is very handy. --> Very useful for that. --> Hopefully that answers that question. --> Since we are now, you know, we are navigating the file system a little bit. --> It's also a good time to just manipulate the file system a little bit. --> Very quickly, we saw the command touch creates a blank file. --> There's nothing in there. --> You can create a folder. --> With mkdir, you can create a complete folder structure with a minus p. --> I want backup slash logs slash generally. --> And I want the same for everything. --> You see, it doesn't give me any errors. --> The rest of the path is already created. --> It helps me quickly create the structure. --> So you can just do touch to create a blank file. --> And you can do mkdir to quickly create a couple of files. --> Can I please request that you make folders with a similar naming as mine, just so that as you follow the commands coming after this, you don't have to keep adapting it to your directory structure. --> Feel free later on. --> And nothing has root. --> We are happy to run this as a moment. --> This is for everyone. --> Please do the same. --> So that's making folders, creating a file. --> Let's copy. --> DC host. --> Now that's a single file. --> Let's copy it in that location. --> Let's copy multiple files with a wild card. --> Anything that starts with whatever but ends with a con. --> Let's copy it in the other location. --> If it finds any folders, it doesn't copy them. --> It's copying only files. --> If I try to copy. --> Back up logs. --> Back up logs. --> It says I don't like copying folders. --> And what it suggests, if you now work on folders, mention minus i. --> The recursive, the whole structure. --> What if I copy the same thing over and over again? --> Doesn't care, right? --> It just overrides. --> Is that good or bad? --> Some will argue it's good. --> It does exactly what I want. --> You don't need my nanny. --> I made a mistake and now it just overrides my side. --> There you go. --> Then you should not be a sysadmin. --> Some will argue. --> The problem is between the chain and the tester. --> Yes. --> In the network layer, we say this is which layer? --> Layer 8. --> When I used to be on service desk, that's the joke we would have. --> Saying, oh, it's a layer 8 problem. --> What's the layer 8? --> Well, the layer above the application. --> People wouldn't understand. --> They're like, huh, what? --> Yeah, it's between the chair and the desk. --> It's called as the OSI layer 8. --> So it doesn't mind just quickly overriding. --> If you don't want that to happen, we'll discuss this later on. --> But we can do a minus i. --> And minus i is a little bit more friendly. --> It's a bit more interactive and it says, hey, you're going to overwrite. --> You can pick and choose whether it's something that you desire. --> A couple of file system options. --> You can copy multiple files into the same destination. --> By default, it just overwrites. --> Assuming all of you are giving this a try. --> Then comes the command to move or rename. --> One command does both. --> mv. --> What does that mean? --> How can it move or rename? --> So. --> First of all. --> Data file. --> mv data file. --> Now careful with the destination. --> If I say mv data file, this is the source. --> The next argument is the destination. --> So if I say mv data file, data file one, what is it going to do? --> It's going to sort of like replace the other file with that one. --> Yes, so there is no file called as data file one right now. --> So data file doesn't exist. --> A data file one does not exist. --> So all it's going to do. --> It's just going to rename this to this. --> So I know mv sounds like it's a command to move, but it moves or rename depending on just one simple factor. --> Does the destination exist? --> If the destination exists is going to move in there. --> If the destination does not exist, it will simply rename. --> Here is another example. --> Try this one out. --> I'm going to say touch file X. --> I'm going to say mv file X, but this time. --> I'm going to say BKP. --> What do you think is going to happen? --> Do we already have a folder called as BKP here? --> Yes. --> So what is that going to do? --> Is it going to rename file X to BKP or is it going to move it to that folder? --> If the destination exists, it's a move. --> So does it do it like copy in this case? --> Yes. --> So does it open right? --> No, no, no, it's just a move. --> You're moving this file into that folder. --> If the destination does not exist, it will simply rename this file. --> Let's have a look at ls file X. --> File X is not here anymore. --> It's gone there. --> Please try this part out. --> Create a file. --> Move it to a folder. --> Watch it disappear. --> Okay. --> I was not even going to. --> Oh, this one it moves. --> It doesn't really copy like. --> It's a move. --> CP will copy. --> Let's try that. --> Nikola, are you with us? --> Winnie? --> Yes. --> Yes, I'm still here. --> Okay. --> It's just a ping. --> TTL, time to live. --> Many hops crossed. --> Minus one, making sure it's not zero. --> Again, yeah, please do give this a try. --> E2, with us trying things out. --> Yeah, it's interesting. --> It's only now that I realize that I've never actually had to read the message. --> I can move files from one location to another. --> Okay. --> Just a little bit of file system. --> Nice to know how to do that as well. --> Of course, at times you might have to get rid of things. --> This is going to appear on my screen. --> You can always do that. --> RM. --> In this case, not many questions asked. --> I've created a file. --> I've removed a file. --> What happens if I say, hey, get rid of. --> That folder. --> Doesn't like that. --> Let's see what is in that folder. --> There's something in there. --> What if I say this, remove everything under that folder. --> That it doesn't mind. --> I use a wild card question marks for one character or you have star for all --> matching characters. --> Zero or more. --> That one is easy. --> It wise that folder. --> Go ahead. --> So quick question. --> Why? --> Why did it? --> Why does it? --> Because that's a folder. --> So it doesn't like deleting the whole folder. --> It has no problem removing all the files in the folder. --> You want to get rid of the folder. --> And minus. --> That should be enough. --> Any open files crash and burn. --> That's all. --> I want to delete. --> I don't care about the rest of you. --> Please give this a try. --> And you can now see. --> That folder. --> This. --> That's your little bit of file system. --> How do we get rid of things? --> RMS is kind of very handy. --> If you want to remove only empty folders, this command comes in handy as well. --> It only needs empty folders. --> Kind of like a safer approach. --> Only going to clean those files. --> I think we are all good with this. --> We'll continue on with some more tricks in the file system itself. --> And that is about links. --> You might remember we said there are four types of files. --> Ordinary files, device files, folders and what we call as links. --> Let's have a look at links. --> So what I'm going to do here. --> I'm just going to take hello and put it in a file. --> My data. --> I will read this file. --> First of all, this is. --> Just put a file that contains ASCII text. --> LS minus L kind of proves that to me. --> Begins with a dash. --> So I know that it's a regular file. --> And I can read it very quickly. --> I'll wait till you do this and then we will do the links business in a bit. --> Now let's try something. --> Let's create what we might think of as a shortcut or a link. --> I'm going to use the command and. --> To create a link, we will use this option called as minus S called as symbolic link. --> So this is the original file, my data. --> And I'm going to create. --> A link called as my data one. --> Let's have a look at. --> The details a little bit. --> I think you should notice that. --> Can you tell what is the original file and which one is the link? --> And it tells you also, right? --> My data is my data one is pointing to my data. --> So you're very clear. --> One is the shortcut. --> The other one is a real file. --> I can work on both the same way. --> Do you notice the link while you're working on it? --> No. --> So same thing when you're working on a folder, it could be a link also. --> You wouldn't know. --> So, for example, it was my data. --> It was one. --> And I was going to show the whole. --> Yeah, you just wouldn't know. --> Yeah, of course, it's going to show you the whole path. --> Absolutely. --> So if you look at the root, you will see that slash bin is also slash user slash bin. --> Oh, but the reason why I was asking is because yet they are on the same path. --> So if they are not on the same path, how will you know how this works? --> When you use the command ln, you will mention the path and it will tell you the same. --> What happens if I get rid of? --> The original file, so to speak. --> Would it let me delete it or it will say, no, you have a shortcut. --> I couldn't care less. --> What happens to the shortcut on the link? --> So here the shell is very friendly, showing you something in red color. --> I wish things like this existed 20 years ago. --> But when you try to use this file. --> There's no. --> I'll do that. --> And then if you create it back, well, there's still a way. --> Let's just say that. --> As long as the path is satisfied, it's happy. --> And I just request you to try this again, everybody. --> You can see it goes red when it says, hey, it's not going to work. --> And then it fixes itself back again. --> Soon as the requirements are met. --> All right, now we're going to do something slightly different. --> Let's talk quickly about the idea of hard links. --> What you saw right now is what we consider as a soft. --> What exactly is a hard link? --> Let's take a look. --> So I guess the analogy for hard link will go something like this. --> Let's say we have a room. --> And. --> This room has. --> Two doors. --> You have door number one. --> And you have door number two. --> So if a room has two doors, how many rooms do you have? --> You've got one. --> One is still a wonderful. --> But the someone can come in from door two. --> And somebody else could come in from door one, isn't it? --> Yes. --> But you actually end up. --> In the same room. --> Yes. --> Let's put some table there. --> You access the same resource, but you have multiple doors. --> Would it matter if we closed one of the doors? --> Would still there be a way to access the room? --> Yes. --> And we could always add more doors, isn't it? --> Yes. --> How many doors do we need operating minimum to have access to the room? --> One. --> As long as there is one door, we are happy. --> We can get into the room. --> This is the idea of what we call as hard links. --> Let me show you. --> Here is file one. --> Here is a link. --> This time. --> Let me share. --> I think it's still looking at my whiteboard. --> But at least somebody noticed that it would be worse if I go on for half an hour. --> Yes, this one person is paying attention. --> I'll take that. --> No, that's the biggest problem. --> It is always looking at me. --> Then the other one, we have double screen, so we are still able to see on the other side. --> Alright. --> We will take a break at one. --> That's fine. --> So we are like a minute away. --> This will only take a few minutes. --> Cool. --> So here I have just created a file. --> You can do this after you come from the break. --> Just watch my screen for now. --> So I've created a file. --> I'm going to do the link command. --> This time there is no option minus S. --> Let's see if that makes any difference. --> I already have files. --> Let me just create another one. --> Here I'll call this as the blue file. --> I'm going to make a link from that to the red file. --> Let's notice something interesting now. --> Do you see anything different here in the way the links show up than what you saw earlier? --> Does anything say that it is a link to anything else? --> No. --> It doesn't show yet. --> Normally it would say I don't have a link. --> But it doesn't have a link. --> What's that number? --> Guess what is that number? --> You have got two files. --> Remember my diagram on the whiteboard. --> There are two doors to the same room. --> Let's watch the blue file now. --> We haven't done anything. --> Something happens on the blue file. --> What have we created? --> We have created the third door. --> What happens if I remove the blue file? --> Typically we will assume that this is the original file, isn't it? --> Yes, it is. --> But the others are still happily working. --> On the blue file you know it's the original file because you just created it. --> If that was not the case, how would you know it's the original file? --> Look for the identity of the file. --> We call it as the unknown number. --> What is common between these files? --> This is the room number. --> This is the room number. --> These are two doors. --> This is called as heart link. --> Feel free to try this out when you come back from the break. --> We take an hour. --> Let's resume. --> I think it's 1 p.m. your time. --> Is that correct? --> Let's take an hour. --> Whatever the time it is for you. --> I think it's two hours difference. --> Any questions on what you see on the screen before we take a break? --> Have a look. --> No. --> Anybody else? --> All good? --> All good. --> So the key is pay attention to that problem. --> All right. --> See you guys back in an hour. --> I'll probably disconnect. --> Let me in. --> See you guys. --> Enjoy your lunch. --> Okay. --> Much appreciated. --> Very kind of you. --> See you. --> Thank you. --> Hello? --> Hi. --> I can hear you. --> Can you hear me? --> I can hear you! --> Can you hear me? --> I can hear you! --> Hello. --> I have an installation for a TV today. --> Can I use it? --> Can you just check? --> I'll give you the number. --> Can you hear me? --> I can hear you. --> I can hear you. --> Same number. --> I can take the alternate number. --> Can you request them to call me, please? --> No, installation. --> Yeah, I have registered two numbers. --> This is the alternate number. --> So I'm sending TV. --> No. --> Yeah, it was supposed to be today. --> I have been calling them for the last few days. --> They said it's due today. --> There's nobody to call them, but I don't want them to disappear. --> So go ahead. --> Two. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> So, --> my video that's sent to a video has changed. --> And so that's basically what this video is all about. --> I wanted to share with you what I've changed in this space and why I did that. --> So without further ado, here is my new office space with, you know, the same old office space with basically a video. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> All right, and I'm back here with you. Let me know if you're around. --> I'm around. --> Welcome back. --> I think maybe we, most of the guys, they will come back in five minutes, just one minute. --> It's all right. --> We can wait for a bit, that's all right. --> You don't know, you won't say anything. --> I wonder what's for lunch. --> It's five past three in the afternoon. --> 12 hours. --> Yes, 12 hours. --> Where are you based? --> I'm based in Dubai. --> Oh, okay. --> Just like the way. --> Oh, okay. --> So he's on my team. I know him for many years. --> It said, yeah, it's too hot at that site. --> Yeah, it depends on your definition of too hot, so. --> Anything from 25 degrees. --> That's our winter. --> And I'm not joking. --> It is winter right now and it is 25 degrees. --> Our summer starts at 14. --> Yeah, it starts at 14. --> Yeah, it would be considered as pleasant. --> The worst I have, I mean it can reach 50 here as well. --> Peak of the summer, you expect 42, 44 kind of on a daily basis. --> It can be 40 in the middle of the night. --> Dubai being coastal, so, you know, it gets humid as well. --> So that's more of a challenge than the heat. --> The worst I have seen is 56. --> 56. --> Yeah. --> I was in Iraq for a few months and I've seen 56. --> I've seen like 44 at 7 in the morning. --> So 25 is winter. --> I guess you guys don't complain. --> 25. --> Yeah, we don't know what is a minus. --> It's not part of the mathematics that we know. --> Give me one quick second. --> I'll be back and then we get started. --> Okay. --> Hi, sorry I missed that. --> Okay. --> All right. --> I'm back. --> Just moved to a new home. --> So everyone's coming knocking in. --> You have the gardeners and the landscapers and everybody offering services all the time. --> All right. --> Assuming everyone's here with me, Vinny, Ivan. --> Okay. --> All right, all right. --> So welcome back. --> We are on a journey in the world of Linux. --> Hopefully we have seen a few things we haven't tried before. --> Any thoughts on what you have seen so far just in terms of Linux fundamentals? --> No, it's good. --> It's quite exciting. --> That's good to hear. --> So as we can see that we might have done some of these things before. --> There might be some gaps here and there. --> It's just nice to know some tricks around it. --> All right. --> Let's see. --> We can continue to work on our environment. --> We'll just see how to edit files. --> And then we will move our how do we work on text files because a lot of if you are doing administration to some extent, there is some file editing. --> Looking at the configuration, that's quite common as well. --> And then we will move towards like tips and tricks on the shell, the environment itself. --> There are a few things that we can do. --> I'm going to switch back to. --> I don't have the same presentation deck as well as a small document which kind of summarizes many of these. --> I'll make sure that Kobe passes on to you as part of the materials that he typically shares in the cloud. --> So you'll have access to that as well in case you want something just as a reference. --> I'm going to look back at some of this content and other content as well. --> So we've seen a few things. --> The last thing that we saw was hard links. --> If you haven't tried the hard link path, I would recommend is do so before lunch. --> If you didn't have the opportunity, please try it out. --> Just so that it's not missed. --> The key is that when I created the symbolic link with the command lm, I did not do minus s. --> And that's what makes it a hard link because that minus s is missing. --> Symbolic link or a typical shortcut, as you see. --> The thing to note with the hard links is that when you do that ls minus l, you see that number increment. --> And we equated that to doors of a room. --> As long as one door is open, you have access to that particular resource. --> Give that a try. --> Let's see. --> Let me just find it out. --> Akana, you've done the same. --> Hi. --> Welcome back. --> Press the mute button. --> That's such a problem. --> It's moving. --> Don't worry, I'm following. --> I trust you, sir. --> Let's ask if any questions. --> Whenever there's something new that I've never tried before, I usually just do it. --> It's just that sometimes we might be building on something, so that's all. --> As long as you're comfortable, it's all good. --> I'm taking notes as well. --> Zola chose that after this meeting. --> I don't know if you have ever tried this command. --> It just popped in my head, as you said, taking notes. --> I usually like this command. --> I run the command for the script, give some log file. --> Now what happens is everything I do, the output of the command as well as the output, I just do exit. --> And now I have a log file, which contains everything I did. --> Looks very interesting. --> Let's check the manual now for the script. --> It's just like a screen capture of sorts. --> Can I go back, please? --> I run this command. --> I can show you a bit of help on it. --> That's a good one. --> Yeah, sometimes you look for the help for something and then 10 new words pop up and then you go into that rabbit hole and you're like, you know what, never mind. --> Just take your word for it. --> It does create a time script. --> So just to kind of what it does here is this. --> If I script my log, pretty much anything that I do from now on, on this terminal. --> The output of and the commands will be captured into that log file. --> So if I say, hey, show me what's in the OPT folder. --> Well, it's blank. --> Show me you name minus a. --> OK, that's the system details. --> Who is on this system? --> You know, I'm just typing a bunch of commands with some outputs coming in. --> I do exit. --> Now it has stopped recording this terminal session and the command and earlier I mentioned a log file. --> So let me read. --> And as the output of what I did, just saying. --> You don't have to do this. --> It's a nice way to just to keep track of what you are doing and to keep track of the output of the commands. --> If you want to go back. --> Part of since we were working on the file system, I think part of working in the file system, especially in the Linux Unix environment, --> is working with text files. --> A huge part of our system configuration is stored as text files. --> And historically making changes to the system configuration required editing some sort of a text file. --> Now there are the classic old school text editors, which are terminal only, not based on the graphical interface. --> Tools like V.I. and that we have the friendlier tools like Nano or G edit. --> And you pick whichever editor you are comfortable with. --> Take an example. --> My. --> And in this case, well, that kind of exists. --> And then all notes. --> And oh. --> So here is a new file. --> Editor. --> And those carrot signs basically are the. --> Commands that we can give out. --> Exit. --> Save it. --> If I do control X. --> This do you want to say what you have done? --> Yes. --> What is the file name? --> I'll keep it as notes. --> And I'll now create a text file. --> Give it a try. --> So we are again very classic, very powerful, but at the same time a little bit complicated. --> People might prefer a friendlier version. --> V.I. person as well. --> I don't use a lot of these editors. --> Maybe I could. --> Then we have commands like G edit and many other editors. --> It's a text editor. --> So it's a text editor. --> I would say at the end of the day, just pick the one. --> So this one is default. --> You would see them in most if not necessarily all. --> I think these days you're going to see them almost. --> And that's where if you're not sure, you go back to something like V.I. for instance. --> Doesn't you? --> Yeah. --> I have to save and you have a control X. --> So it will save automatically. --> It will ask you most likely. --> Oh, OK. --> Save, modify, OK. --> Yes. --> Write name to write, notes. --> OK. --> All right. --> So just a quick question. --> When saving that name that was created example notes now. --> And give a different file name as well. --> It should just save it. --> Likely as a saver. --> Yes. --> I think somebody muted me there. --> So what I wanted to find out is does it change the original file name or does it just create a copy and then yes. --> And then you can add anything to save. --> Just add something and then exit, save. --> And then here, if you just change the file name and then enter. --> Yes. --> Does it rename or does it create a different copy? --> It didn't ask you, right? --> So if I said yes, then I probably end up with two files. --> OK. --> Now try opening notes. --> Because we did the file save as. --> I'm just reading the file. --> That's like file save as. --> That's the new file. --> That's the old one. --> Somebody keeps meeting me. --> It's more the same as. --> Let's get into that just after this. --> You're one step ahead of me. --> But yes, you're getting into that just after this once we create some. --> Cat is good for things that show up on a single page. --> More allows you to read large text outputs with more capabilities. --> Typically by habit, I just do more. --> I do cat when I know that it's going to fit within one page. --> OK. --> Everyone OK with this? --> Yes. --> All right. --> Here we go. --> So that's just an example of a text editor. --> When it comes to reading text files, first of all, just a reminder. --> Use the file command to see if something is a text document. --> If I want to read it, I can always use cat. --> It's just technically to catalog and it just prints out the file onto the terminal. --> If you're working on large files, you probably want to work on the command more. --> For instance, the password file is a big file and a lot of users define into it. --> So with more, as you can see, it has now paused on one single page. --> I can scroll with the space bar or the key, but the enter key enter goes kind of line by line. --> And space goes page by page. --> If you're reading a long document and you found what you're looking for, you don't have to read through the rest of it. --> You can just press Q to quit. --> More is also handy because it allows you to search for something in the output. --> So we can kind of do a quick filter and look for something within that document itself or that text output, which is very handy. --> So if I'm looking at more right now, instead of pressing enter or space, I can just put a slash and type something I'm looking for. --> And it kind of scrolls is not the friendliest tool in the world, but it kind of scrolls to bring that part of the page where what you're looking for is there. --> You might still have to hunt around looking for it exactly where that is, but it just brings that part in onto the screen. --> So many things can be done with more. --> If you just press H for help. --> While you are doing more, it tells you there is a lot you can do. --> You can fire up VI from the current line. You can go forward and back. --> It's just plenty of options. There's a very interesting one. I want to execute the command while I'm reading that file. That's kind of nice. --> So if I'm reading a file. --> I don't want to exit, go to the shell and come back to this file. --> I can just do exclamation mark. --> And run a command. --> I get the output right there. --> I can still continue to read the file, so this can be handy if you are like reading some configuration file and you want to make some changes, but don't want to hop in and out again and again. --> Very powerful, very useful. This is more. --> So here, if you are already in the file. --> Here you see with the PWD, you are only checking pretty much where you are at the moment. --> But are you only, I mean what are your limitations? --> Just run whatever you run, we'll just run in a sub shell. That's it. --> What do you mean by limitations? I'm not sure. --> So while opening this file, can I just randomly put Yatharam in here and just exclamation and continue. --> It just brings you back. --> It executes that one command and brings you back into more. --> It's hard to forget. --> I'm still in this file. --> Just can be useful. --> Every command has so many options in this platform, so everything boils down to what you need. --> When you need in terms of capabilities, the terminals are brilliant. --> The shells allow you to do a lot. --> Alright, hopefully that answers the question. That is more. --> In many cases, you don't want to read the entire file. --> So we have cat, which kind of reads the file, which we saw that. --> But we also have tack in Linux, which also reads the file just in the opposite sequence. --> That was the last line. Now here it has become the first line. --> So it just reads the file but from bottom up. --> Sometimes you want to see the last few entries first. --> That is some way of doing everything. --> So you can read top down, you can read bottom up opposite of cat. --> You can also in many cases we do use this. --> We can just read some specific lines at the start or at the end. --> Typically we use command like head. --> Give me the first five lines from host or the opposite, head and tail. --> Give me the last five lines. --> So it can be handy if I don't want to see everything but just the start or the end of a text file or what I'm looking for. --> Give it a try. Very simple one. --> Head and tail. --> Other things that you can do again. --> So this is still working on the file system, specifically working with the text files. --> This kind of works. --> And we have tail. --> We have another one that can help us sometimes in certain scenarios where we need to know how many lines are there. --> The command I'm talking about is called as word count and it is called as wc. --> So if I just run this command word count and if I press enter it just gives me nothing but a blank screen. --> So what I'm doing here is I'm going to type a few things. --> This is one line. --> This is another. --> We have one, two, three, four, five, six, seven, eight, nine, ten, eleven. --> Eleven words. --> Now that I'm on a blank line, I'm going to close this file. --> The Linux Unix shortcut to close the file is control D. D for delta. --> It is end of file. --> I do control D and word count is counting this text. --> And it is telling me I have three what? --> Three lines. --> Three lines. Eleven. --> Eleven words. --> And fifty characters in total. --> Yeah, fifty characters in total. --> And remember as I said, sometimes you learn things and you're like, when am I ever going to need this? --> Maybe I just want to know how many users are in my machine. --> Count the number of lines in that file. --> Well, I know that each line is a user. --> So I can quickly tell I have 50 users defined in this OS. --> The use cases come over a period of time. --> Some you never use. --> Some you do. This is word count. --> Simple tricks, but they can be quite handy as well. --> All right. --> So now from the file system, let's move more towards the shell environment and some tips and tricks around working in the shell environment. --> We are comfortable with text files, with the directories, with manipulating, with editing, with moving around with symbolic links. --> Let's now have a look at just some of the tips and tricks in terms of how to use the command line. --> The very first few things we need to know is what you are executing, where it is, and how to create aliases to make your life that bit easier. --> Some of you already mentioned that command, for example, which WC, where is this executable? --> The location of this executable is in user bin, basically the binary files for everybody. --> That location means a common system tool, which IP. --> This tool or executable is located in S bin. --> Single user, super user basically means it's a system administration tool. --> So what we are executing on the shell as commands or executables can be in different parts. --> For example, when I do CP copy something. --> The copy is located in the USR bin. --> So that means a common binary for system. --> When I use the command CP, let's say to copy the files. --> We saw this earlier that CP doesn't care if we are overriding a file. --> I did it twice. --> No questions asked. --> Anyone remembers how to make CP ask us in case we are overriding something? --> Minus I. --> So it would probably be very nice if every time I ran the CP command that actually replaced it with the CP minus I. --> That would be nice. --> And this is what we call as creating an alias. --> You execute the alias and it is substituting it for something else. --> How do I do that? --> Maybe just like this alias CP equals to please pay attention to the spaces and the quotations. --> This is single quotation. --> I'm going to say CP equals to be space minus. --> And now if I copy again, just like I normally did earlier. --> Something happens. --> Seems to be replaced with a CP minus I. --> Can I please request everyone to try this out? --> I can see Vinny is already doing the same. --> Would this be just locally for you, your machine or even if Lucky accesses his CPs then it will override to CP minus I. --> So let's not even talk about systems. --> Let's even look at terminals. --> I have another terminal open here. --> Doesn't seem to be caring about that alias. --> So your terminal is a programmable environment. --> In this case, what we are simply seeing is programming it temporarily specific to that terminal. --> And then if you want any of this customization of programmability to survive, --> then as a user, there are a few hidden files in your home directory where you can make some of these things permanent. --> And as system admin, if you want to make some changes like this for all the users, then there are some other configuration files that you can work on. --> So that way you kind of make it more persistent system wide. --> This is temporary programming of the terminal. --> OK, so as you can see, the other terminal couldn't care less. --> Wherever we get back to this one. --> So what we can do here. --> Run the command alias just to see do any aliases already exist. --> Looks like it does. There is some aliases. L is actually LS and LA and LL. --> And you can make your own aliases for any commands that you like. --> Just pay attention to the quotations in use. --> And there is no spacing here between the alias and the command that replaces the alias itself. --> If you don't want the alias, it's fine. We can unalias it. --> But before we go there,