 So, next is user and permission, I am sure you already know this. So, who am I shows who is the user logged in at present, W shows how many users are logged in. So, this is my remote machine which shows who else is logged in here and next is CH mode changing the mode of a file. So, ls-l1.pxt shows different modes here. So, the first hyphen is for whether it is a file or directory. So, if it is a file it would not show anything if it is a directory it will show D. For example, ls-l slash dev. So, it shows D in front of all the directories and it shows hyphen in front of files. So, the next triplet is for the user, next one is for group and the last one is for others. The user has read write permission. Suppose if I want to change the permission I can simply minus r it will work. So, there are multiple ways to remove a permission. So, I want to remove read permission from 1.txt. Now, if I do 1.txt it does not have read permission. What I did I actually remove read permission for both user and group which I did not want it. So, suppose I want to remove read permission only for user is it like this. So, let me let me bring it back to original state. So, ch mode plus r 1.txt. So, now we have 1.txt in original form u minus r. So, let us bring it first in the original state. I think yes you are correct 1.txt u minus r. So, remove read permission from user not from others. So, if you use simple r it will remove read permission from all of them. Similarly, for group you can do g minus r for others you can do o minus r. For others if you want to give read permission you just do o plus r. So, ls hyphen l 1.txt. So, others earlier we did not had any permission now we have read permission. So, this way you can change user modes. Similarly, there is another command ch own it says about ownership. So, who owns this file? Shrikanth owns this file and Shrikanth group owns this file it is also in the Shrikanth group. So, suppose if I want to make suppose I want I am leaving this company or leaving this directory and I want to migrate all my files to some other user that case. So, I will use ch own command to I know there is another user let me know slash home there is a user I do not have password for anyway. So, I know there is a user amit. So, ch own 1.txt amit dot amit to 1.txt. This means change the user Shrikanth from amit and group Shrikanth from amit. For this it requires a pseudo privileges I think amit is not actual user in my machine maybe I have to use some other user may be Manish. So, 1.txt. So, now the user is Manish the group is still Shrikanth. So, I have not changed the group you can change the group if I give like this this will change group as well. So, there are other flags through which you can only change the group you can only change the user there are different flags with ch own. So, in networking we already seen if config ping you already know the pings through the network SSH we have seen scp and wget scp is similar to SSH you can copy files from your machine to a remote machine. Similarly, you can copy files from remote machine to your own machine. So, let me copy this 1.txt to my the other machine Shrikanth this machine and where I want to copy I want to copy in slash dem directory. So, I am using scp file name my user the user with my remote machine at the rate which IP 10.101 11.109. It is my lab machine it is running we already know we are in same machine. So, I copy it. So, how to validate? So, in this machine remote machine ls dem 1.txt it is there. Similarly, if I want to copy from remote machines to this machine all you need to do is you have to change the order copy. So, let me find out some file in this dem which I want to copy to my home directory. So, there is success underscore examples underscore v 2.txt. So, I know there is a file success underscore examples underscore v 2.txt where I want to copy I want to copy into present working directory. Just reverse of the previous one. So, here is the source my source is a remote machine Shrikanth at this this this colon path of the file in the remote machine and this is my destination path. So, let me put it in my dem directory itself. This ask password of my remote machine not this machine. So, may be. So, let me copy this to dem just to reuse my previous command correct. So, now I copied from my remote machine to this machine how we can find out ls half an lrt if we show the latest file over a copy to dem sorry ls half an lrt success examples v 2.txt. So, this is how we copy from remote machines. So, file is a command which will tell you what kind of file it is where is the text file binary file. So, user bin ls. So, it is an executable file file. So, this is a compressed data file file 1.txt file. So, with file command you can know the nature of the file without opening it df and du we already seen df we have not seen. So, df shows the disk partitions. So, I have these many partitions h means human readable format mount shows all the devices connected to this machine. This is not very important suppose you have connected you have mounted multiple file systems to your machine windows drive Linux drive pen drives CD drives. So, this will list all of them tar and zip free free will show the amount of free space in your memory. So, in my case I have 4 GB of RAM out of which I have. So, let me format it properly. So, I have used 3 GB of RAM out of which 600 1600 is swap sorry 1600 is actual users and swap is 2. So, there is other another graphical way to view this is h top. So, here you can validate. So, out of my 4 GB of memory I am using 1700 of RAM and out of 1700 sorry out of 6 GB of my swap space. Swap space is like your virtual memory in windows I am using only 200 MB. So, free is a command which will show you how much is actually used. So, 1600 is actually used and 200 is actually swap space. So, next command is tar and zip. So, this I find very useful. So, for example I have this 100 files. So, if I want to upload this 100 files to my Google drive will take lot of time. Suppose I want to attach this 100 file what you will do exactly you will go to the set directory you will right click create zip that is it right. But there are convenient way to do this. Suppose you have an application where you have 100 of directories and you want to make 100 such zip files. One zip file for all directories you want to make individual zip files for individual directories. You cannot go to each directory and right click and do compress to zip, compress to zip, compress to zip. You can easily write a script shell script to do that. How? For example, what I will do is I will use fall loop. I know I can it contains 100 text files. So, I want to create 100 tar files. So, tar is a Linux favorite compression program and like zip it is free it can be used for any purpose. So, for each in let us say ls-1 do equal dollar each done. So, this way I am telling you how to use for all. So, this is a one liner. So, what I can do I can copy this same into a shell script. So, suppose I will say script dot sh and here I will say for each in dollar ls-1 star dot txt do equal dollar each done. How to execute bash script dot sh? I just did equal in this command right nothing else. Instead of bash you can also run this command using dot slash for that you have to change the mode ch mode plus x plus x for the user. Now, I can simply run this as a script. Let me open my script dot sh again. So, this four lines can be easily done using bash single liner not bash single liners shell single liner. So, this we will see here. So, for each in. So, instead of dollar you can use this also ls-1 star dot txt do equal dollar each done same effect. The thing is it is very convenient to do it on a terminal itself rather than writing a script and doing it. Now I want to tar each 1 dot txt. So, help me with this tar each is what? 1 dot txt, 2 dot txt, etcetera etcetera. So, before that let me show you that syntax for tar. So, tar is cf, c means create f means file 1 dot txt dot tz, tz means compressed with gz compression. So, I want to retain the extension 1 dot txt and after that I want to add dot tz. So, this is the syntax for tar. I have to use z for this compression which I have not used. So, now it is compressed how do we know 1 dot txt dot it shows gz compressed data from unix etcetera etcetera. So, now I want to repeat this for all 1000 files. So, let us get back to our for loop. So, now we will replace this eco with our tar command, tar cf. So, this will be common for all you agree? Yeah. So, dollar each will be suppose 1 dot txt or something. This append with dot txt let me see whether it works or not and here dollar each czf. So, ls tar dot tgz word count. So, we have created 1000 compressed files. Similarly, you can create for zip although I personally do not recommend you to use zip, but in Linux we have a command for zip. So, zip hyphen r. So, same effect dollar instead of tgz we will use zip done ls tar dot zip we have all the zip files. So, this way it is very convenient that is what I want to say using shell using pipe you can do repetitive task very easily. So, we have seen tar and zip. So, there is a command export which I used once, but I have not explained. So, export is to change your shell variable. So, for example, eco I forgot to explain what is eco. Eco is like printf. So, if I say eco shrikant it will eco shrikant if I say eco ls it will eco ls like that. So, eco you can use with inbuilt variables. So, there is a variable path these are shell inbuilt variables, shell environments. So, this is my shell environment for path. So, path actually gives you the path for the binary. So, ls sorry which ls. So, this tells me where is the ls binary. So, ls binary is slash bin slash ls and how to shell knows that way to look for ls because in my shell environment if you see my shell environment this one eco dollar path there is somewhere bin slash bin will be there. So, somewhere here. So, we know how to find out grep slash bin it will highlight and we know this one right. So, because slash bin is included in my dollar path variable I can access ls command easily. For example, we have created this script dot sh. Can I run script dot sh directly? No means it cannot autocompletes if I do like this it says command not found. The reason is the script dot sh is not included in my path. So, the shell does not know where to look for script dot sh. So, what I will do I will export my path variable dollar path export my path variable and I will append it to my existing path variable with slash home slash shrikan. I am just expanding the path which is known to you set what it does it is exporting the environment variable path it is adding home shrikan intern set directory to my already existing dollar path variable dollar is a variable linux shell scripting dollar is a variable and I hit enter. So, let me try something went wrong any clue it has not added this directory into the path. So, let me check my bash rc which contains. So, it should be path equals to. So, what I have done here is path colon. So, now my new path variable is equal dollar path contains my newly added path. So, this way suppose you are working on a project which is suppose you are working on a system where you do not have permission to add your binaries to your system file system directory. See what I can do is I can copy the script dot to my user bin and I know user bin is already included in my system path. So, whenever if I copy this it will already in my path. So, it will execute, but I do not have the permission because I am normal user only administrator has a permission. So, in that case what you will do you will just do this for your particular directory. So, that it can be included in your dollar path once it is done you can simply type script dot sh no need of dot slash bash. I think that is it. Thanks for joining. So, if you have any questions you have my email id.