 So, our first session today is using Linux tools. So, Cs is the same as the name of this course which is software development techniques for engineers and scientists. So, when we introduced this course in IIT Bombay that is when we were recommended a small change in the name of the course, we are not calling it software engineering the way it is called in this, but it is titled software development techniques for engineers and scientists. For any questions please interrupt us in the chat or directly and we will take up questions in the middle. Answering your questions is helpful, so that others who will have the same questions will also become clear. Hence, please do not hesitate in asking questions, please make this very interactive. If it were a regular classroom it would certainly be interactive. Now, we want you to take the initiative to make this an interactive session. So, the outline for the two sessions of today is as follows. So, we will quickly do some getting started related commands, then we will do some basic file handling in Linux. So, for those who are new to this you would have already seen the Moodle slides for this. So, Linux commands are almost the same as Unix commands. So, these commands are going to be relevant for both Unix and Linux. So, most importantly we will study something called the shell. So, a shell is also called a prompt. How to use a shell to our advantage is what we will see in the whole of using Linux tools. So, we will also see some text processing typically cut, paste, copy and some simple shell scripts. So, what is pause free and open source? Linux is an example and this is free not like we have something which is free for using. This is free in the sense that one can also modify a very important difference. Just free would mean like free beer somebody has given us some free food, but this is free in the sense that open source we can modify we can use it for any purpose we like. The Linux itself is inspired by Unix. So, there is a small difference between the licenses. So, Linux is also called GNU. So, these are some introduction about Linux. This is best seen on Moodle. So, at the time of logging in one typically sees GUI for the Linux nowadays, but then there was a time when there used to be only shell based logging in, only shell based working only now we also have a GUI. Thanks to the GUI Linux has become very popular, but it is only windows type popularity that is coming into Linux because of the GUI. There is a very large power of Linux that is under utilized because the shell aspect is not used. So, we will see that in more detail today. So, the most important thing is when we are working in a shell then we want to always know which working directory are we working in now. So, this is what we will see as a shell. So, this dollar that is shown here is what is called the prompt and because something is blinking there it is waiting for us to type. I am typing random letters now, but one types at the prompt and one can of course enter it, but these are not meaningful commands. So, it says this command is not found. So, our first important command we will study is called PWD. It tells what is the present working directory. PWD stands for the present working directory. On the slides it says home user while on our on the shell when it says home SDS that is because on this computer we are currently in the working directory home SDS. So, we can also see what are the various directories files inside this. We can go into a directory by using the command CD, CD for change directory. Many of the Linux commands are very meaningful and very suggestive. The commands are very self-explanatory, but the very commonly used ones are all abbreviated. So, LS stands for list, CD stands for change directory. So, these are extremely commonly used and hence we have small small commands for these. So, let us go into the directory called desktop. So, please notice that this is very case sensitive. So, while so now we have gone into the desktop directory. We can go back this dot dot stands for back that is what we will see in more detail now. So, I really hope that many of you have seen the Moodle slides. So, that we can do this faster in the IIT Bombay course. For example, we do this over 2 weeks, but then because the slides are available we would like to go faster. So, we are again in the directory we started with. As I said we did CD desktop to go into the directory called desktop. How did we know that there was a directory called desktop? We did LS and saw that there is this directory called desktop. This particular shell it colors the directories in a different color from the files. So, that is why black examples dot desktop is a file that is coming in black while the directory names are all coming in blue. To give an example that this is indeed case sensitive. So, let us type this. Then we see that desktop with a slightly different spelling. In fact, the spelling is same only the capital has been written as small and it says that such a file or directory does not exist. So, please note that Linux shell commands are all very much case sensitive and hence you please note what is capital what is small. So, we are here to check that we indeed went into the desktop directory. Let us type present working directory PWD again. So, here we are in home SDS desktop. So, we can now go into another sub directory called ULT. So, now we are in home SDS desktop ULT. So, this is how one navigates through through the prompt directories. Let us go to the slides again. So, we saw LS already. So, when the slides were made in that directory there were different files as you would guess. So, now we will like we will see how to make a directory. If you in inside this particular directory we are in we can make a new directory and we generally do not recommend the names of files and directories to have a space in the middle. We will see what is the problem because of that very soon in this course. So, let us also see a few more slides and then start practicing them together. So, let us make a directory here. We are in this directory. We see that there are some there is examples and ULT.pdf. It appears like examples is a directory that is as I said because the color is like that, but one can do LS minus L in more detail to give all this long list. So, we would like to say that this particular is the command. It has some arguments. It has some optional arguments. These are like options. We would we say that these are options. So, every option typically starts with minus sign. So, just LS gave us a list of files, but we need LS minus L to see that some of these are directories. It says directories. What this additional r w x is that is something we will see later today. So, it also says what is the last time it was modified etcetera. It says that there is one directory called examples. We can make a new directory make there new directory. So, we have this three things now. We see that the new directory is also a directory. How do we know it is a directory? This particular letter that is highlighted the d there means it is a directory. Similarly, for examples also while if it is for file it is only dash. You can go to more advanced things and see that there are d dash s various things are also possible instead of just file or directory. Let us go to this new directory and there is nothing yet. Of course, there is nothing because we created it just now. So, how what is the meaning of going back? So, when we are here. So, we are inside this home s d s desktop u l t new directory. We entered into the new directory by c d new directory. We would like to go one step before. So, this dot dot stands for the parent directory. This is we are in the present directory the current directory and the previous directory to which this is linked is called the parent directory. In order to go there one says c d dot dot we see that we have gone to the previous directory. This directory handling through the prompt is extremely important. I am sure you can also do this using a using a GUI in which one typically sees up arrow mark to go to the parent directory. So, but then to do it through the shell is of is very powerful. One can write scripts to go to various directories do something come back that would not be possible using the mouse and clicking again and again. If you want to automate something that is when the script is really demonstrating its power. So, double dot we have already used we have not said what is single dot l s dot dot means current directory. So, if you do if you are already here we already saw what is c d dot dot it will go one directory before, but c d dot means what it is the same one as I said dot means the current directory. There are various places where we need to explicitly use the dot when we when we are moving between directories when we are moving a file between directories when we are copying one file from another directory to here that is when we really require the dot. Now, that is how we already saw how to make a new directory let us say how to make a new file. So, the new file is most is most easily created by using the command called touch new file. So, we have two directories two files the ul t dot pdf and new file both are files it is not required that you give an extension to the file ul t dot pdf is a file with an extension, but the new file is not it does not have an extension is it because that ul t dot pdf has an extension that is why it is shown in a different color these are things you can see in more detail by ls minus l. So, I should say we will see this in more detail, but this execute aspect there is a ul t dot pdf it is just a pdf file, but it is been made due to incorrect copying for example, into this it has been made into a executable file. We do not need to execute the ul t dot pdf one just views the pdf file in spite of that it has been made into executable file you will see this in more detail when we see the command chmod one important thing to notice in linux and unix one does not decide whether it is a pdf file or text file just based on the extension. The file also has some information about this for example, we can use the command file for ul t dot pdf and see what it is the file ul t dot pdf it says is a pdf document with so and so version. If you copy the ul t the command to copy is cp, cp source destination cp ul t dot pdf to new file one dot let us say doc nobody prevents us from giving the doc extension. So, we have more files now let us see file new file one dot doc it still says it is a pdf document. So, notice that just because you chose to give it a doc extension does not make it a doc file it is it still continues to be a pdf file it is one very important difference between linux and unix ways of knowing a file from windows from microsoft windows method of knowing recognizing a file. Let us continue to the next slide. So, it is if we have heard of some command or if we know that this is a specific command and we want to know in more detail how to use it that is when one requires some help about that command one of them is what is there are three there are at least two ways of finding a help here one is what is touch one is man touch. So, what is just give some very basic information about what that command is if you are confused between two commands and you know what they are doing just a small confusion then what is the command to use for this purpose. So, as I said this particular thing that we type immediately at the prompt is called what is called the command in this case the prompt has a dollar here in our particular shell also there was a dollar, but one can have any information in the prompt one can have a longer prompt if required this is the command and this command takes an argument this touch is a argument. So, if you want to know how to use the command called touch then you will use the command called what is and give this touch itself as an argument argument to which argument to this command one can get more detail information using the command man man means manual we recommend that you try this on your own computer, but when you use what is command it will just give that information come back to the prompt one you do not have to type anything to quit from that particular information page unlike man because man is a very detailed information you type man touch and opens a page with lots and lots of information plenty of screenfuls of information and then you have to know how to quit and come out of that. So, remember to press Q and quit out one can also see in more detail the manual for the man command itself by man man one can also get some information by minus h option as I said minus sign is like an option option to this command using minus h one can get some help for example, if you want to know how to list not just the file in this directory, but across all sub directories then minus r is an option, but you do not have to remember what option to use for some advance things always you will learn to use help and learn it when you require it we do not we are not going to test memory for any of these commands for any advanced purpose. So, if there is also something called apropos it searches for searches for a command inside inside various man pages extremely useful. Let us go to file handling. So, we already learned how to copy a file if you want to remove a file then r m is a command to use r m means for remove r m and file name the same command can be used for directories also, but not the default way r m works for files like this if it is a directory then because there is this potential problem that we might remove an entire directory thinking it is only a file and there might be plenty of useful files inside it that is why explicitly we have to say minus r that is r generally stands for recursive. So, minus r means remove the directory recursively inside the directory you go remove any files there if there are sub directories go further into the sub directories recurs through them and remove them all r m d i r can also be used for this purpose we already saw c p c p we copied one file from the current directory to another file in the same directory c p source destination, but one can do this across directories also. So, it is important to note that c p will also overwrite files if that if that destination is already a file like already an existing file then that will get easily overwritten. So, we will see this as an example. So, we did c p u l t dot p d f to new file one dot doc we did this and created the new file one dot doc let us do this again it has overwritten it appears it did not tell here that it has overwritten. So, again we have the same set of files it is not clear that we have overwritten really. So, let us do file new file this was a new file we created using the touch command let us now copy this u l t dot p d f to new file and then let us check its file type. So, this really proves that we have overwritten the file new file overwritten it using u l t dot p d f new file was already an existing file which we had first created using the touch command. Now, we have overwritten it using u l t dot p d f and more generally we are concerned that when we are copying a file from a source to a destination this overwriting might happen and we do not want this to happen that is when we are going to use the minus i i for interactive interactive. So, let us do this again now it is asking whether we should really overwrite or not this is just a warning for us we could we could alias the c p command to c p minus i. So, that always we are prompted whether we really intend to overwrite or not. So, we can now choose to say yes or no. So, if it is yes then we will overwrite it I was telling you that when we are copying or moving that time we need to know this destination. So, this c p command it is not automatic if you are doing u l t dot p d f you have to give a destination c p source destination with or without options minus as I said are options and that is always a default. So, minus i is never compulsory in none of the options are compulsory there is a default option always, but the source is compulsory and the destination is compulsory. For example, c p source and if you forget to give the destination it will not work it is especially important if for example, look at all the files that are then examples directory. Now, suppose you want to copy a file from examples directory to copy the particular bar dot t x t file from within the examples directory to here it will say look there is no destination. So, for those who are noticing that I am able to type so much faster please note that one uses the tab command tab tab key in bash for all kinds of auto completion. For example, this is a small digression from what we are doing there is a examples directory suppose you want to go to examples you type c d the command itself has to be type then e x if we type now I am going to about to press the tab key it is going to complete it the whole completion has taken place by the pressing of just one tab key extremely useful it will complete only as long as there is no ambiguity if there is an ambiguity then it will stop there. For example, we could also make a we could make a directory called example and we could do c d e x and then tab then if we press this it will if we press e and press tab it will complete only as much as possible it is stopped there because there is an ambiguity a second tab will give us what all is possible. Now, we are trying to let us go back we were copying a directory particular file from examples to here that is when and if we want the file name to be the same we are not intending to change the file name that is when we will just give it dot this means copy bar dot t x t inside the examples directory to the same file name in the current directory just putting the dot now has helped that no destination needs to be given explicitly let us see let us see what all files are created that is bar dot t x t that is been copied here also it was not there here notice what all is there here only these 1 2 3 4 5 6 7 7 files and directories let us copy another thing from examples food dot t x t will copy here and now we see that this food dot t x t also food dot t x t was not there first it has come now one use to clear the screen after having type various things to clear the screen one can type clear there is a shortcut called control l that also clears let us go to the next slide are for recursively copying a directory including all its sub directories and files inside the sub directories all will get copied in one go using the r command using the r option one can also use the m v command for moving if you are not interested in just copying if you want to move a file from one place to another one option is to copy it from there to here after checking that it has copied very properly then you can go ahead and remove the old one for it is unlikely that something goes wrong in this unless the files are really big so one can also do move nothing goes wrong with move m v command moves a source from the source location to destination move source destination I again for interactive if you are concerned about overwriting as I said if the overwriting is not an issue then it will not prompt you for yes or no it will ask you only if there is a possibility of overwriting only if overwriting is going to happen potentially please note that we are not doing the minor details because I assume you would have gone through the slides there is a question from VIT Vellore sir I try to copy from the that is Ubuntu is on one source and I try to copy from another D drive or some other drive yeah but it is not copying I want to copy from other directory directory yeah so can you that means other volume are you able to see the different volumes the different directories in Ubuntu yes sir I can so we can I can these different drives I believe are because there was some partitioning done according to windows yeah so in Linux we do not use these C or D drive so it is recommended that you use the tab for auto completion this use of the tab will ensure for example that we use forward forward slash instead of backslash right so in windows one typically uses backslash between directory names inside a long directory sub directory sub sub directory inside that one uses slash but in windows one uses backslash and in Linux one uses forward slash this is a very common mistake but then such mistakes are automatically ruled out if you use auto tab auto completion using tab so we recommend that you first practice copying source to destination between various files in the same directory then you go to copying files between various directories inside the same inside the same larger directory and then you go to copy across volumes yeah for example when copying a file from a pen drive to the hard disk in Ubuntu one has to do it across volumes across partitions that is something that we recommend using the tab that is when it will complete and ensure that all the slashes all the spellings are correct yeah so we recommend that you do this but then this is a question that is a little more of the advance nature which we are sure you will do if you are given little more time so please do this little later are there any other question thank you thank you very much for asking this one more thing yeah please do please ask sir when I type CD dot dot yeah as to suppose to move to a parent directory yeah but it is not moving instead if I put CD it is going to the parent directory sure thank you very much for asking asking this question this is something almost everybody each one of us when using Linux for the first time will certainly encounter this yeah thank you very much for asking so this is something I will address to the entire thing again slowly are there any other questions which I can ask to which I can answer together no sir it is very good sir thank you okay thank you yeah please yeah please ask yeah suppose I am renaming a file I am copying a file that is PDF file to another file like suppose a first is a PDF file and I am copying it to first one what will be the default extension for that file they were took two important questions one question is that somebody had typed for example here so one types somebody has typed CD dot dot and dot work but they type CD just CD and worked so please keep in mind that in Linux command then space is very important yeah there is always a space between the command and option there is a common there is a space between option and argument between two arguments space is always required to be there because the space is required to be between the command and argument space is the key thing that separates different arguments it separates the command from the argument that is why we do not keep space inside the file name itself inside one file name we do not keep a space because space is already playing such a key role for all other things in case the space is already there then we will teach very soon how to escape that particular character that is a little more advanced thing so first important thing first important thumb rule never use space inside file names and directory names now between CD and dot dot if you do not leave the space that is when we get command not found yeah now if you do this then we indeed the command has worked it has gone to one parent directory but CD also instead of giving dot dot as an argument or giving the directory name as an argument if you do not give any argument if you just press CD then it goes to again it appears like parent directory only because we were in desktop yeah so this particular directory we started with is also called our home yeah this is the home directory we enter when we login into the system when one logs in into this computer then one reaches the home and this home is where we will reach when we use the CD command from any other directory just to give an example suppose we go to desktop and then ULT and I think examples was there this is the directory we do CD dot dot we go just one before yeah but now if you press CD then it has gone to two directories before in fact any other place we could have been and when we press when we type just CD we come to the home directory this for for this particular computer and for this user called CDES SDS this is the home directory yeah if you are in some other directory called desktop ULT if we are here and we want to know where will we go if we press just CD then home is one particular shell variable we will like to say we will see this later today but home is the variable that captures this information where will you go if you press just CD you will go to the home directory the home directory that home variable is extremely important all your files are there and inside that is where you have access to write etcetera so this answers one important question about CD so CD space dot dot is extremely important the space please notice where I am typing the space always space is required between the argument and the command between one argument another argument it is required between option and argument etcetera between options the various options themselves can be combined without a space yeah that that is the only place where space if you do not put nothing will go wrong all the options can be combined together without a space the next question was that when we create a new file what extension do we give does linux automatically given extension or do we only have to always choose so unlike windows here unlike Microsoft windows in Unix and linux one can choose any file any extension it is only a convention to give doc extension for doc files pdf extension of pdf files tec tex extension for latex files this is only a convention all the commands will work even if you if you use a very irrational extension policy the commands will still work for example ul t dot pdf so we are here we see that there is this ul t dot pdf file ul t dot pdf we can see double f has caused a problem it is a pdf file yeah we remember that we also we renamed we copied a ul t dot pdf into new file dot pdf new file one dot doc yeah this is not a good naming policy I did this only for the sake of demonstration that is also pdf file how do you view pdf files in there is a viewer called events you can view that for viewing the ul t dot pdf for example this is the same presentation that you are viewing on a view with better resolution we can use events also for viewing new file one dot doc yeah why because it is actually a pdf file yeah so events has opened it even though it is a doc file to say it is a doc file is not the correct usage of language why because file command is telling you that is a pdf file yeah events as I said is for viewing pdf files let us try to view foo dot text yeah foo dot text is really a text file and if you view it it says unable to open document because it is not actually a pdf file yeah so please note that no matter what extension you give if it is a pdf file then a pdf viewer will automatically recognize and open it it will not need to recognize it will open the pdf file directly yeah if it is not a pdf file and still if you insist it is a pdf file it will not be able to open yeah this is the other problem we can quickly try we will copy foo dot txt which is actually a text file into foo dot pdf yeah this is certainly not a good thing to do but now let us see if events pdf viewer gets cheated yeah if you do this it does not open it says file type plain text actually the file type is a plain text document it is not a pdf file this much events has understood that is why it said it is not a pdf file we could also see foo dot pdf and see it says actually it is just plain ascii English text we can see what is this pdf file and say some information some plain text plain text is viewed using less you can use less and the file name for viewing a plain text file remember to use q to exit out of that there is one more question from Kallapur there are two questions on chat which we will take up first which Linux version do you recommend yeah that is one question other is what is the difference between move and move minus i minus i as I said is for interactive if you are concerned about overwriting then you will always use minus i at least for my own computer I always alias there is a command called alias I always alias move cp and rm to move minus i cp minus i rm minus i how to alias we will see later but because I am concerned that I will remove without being sure I will overwrite without being sure about overwriting so minus i just ensures that you will be prompted whether to really overwrite only when there is a possibility of overwriting the other question is which Linux version do you recommend so I have been yeah this is some question which we can answer in different amounts of detail yeah so I have been using Linux over the last 15 years and Linux has gone through lots of improvement lots of changes yeah but always for many years Linux used to be very difficult for installation if you are installing Linux on your own computer then you have to have lot of systems administration skills all those skills are not required with Ubuntu version with the Ubuntu version of Linux no amount of systems administration is required so for those of you who want to get started with Linux just start with Ubuntu this is what I would strongly recommend yeah as I say Ubuntu is for humans so Ubuntu releases two versions every year one in April one in October so 10.04 would mean the version that Ubuntu released in 2010 in April and 10.10 would mean Ubuntu version released in October 2010 so Ubuntu latest version meaning 2011 April is not so stable so I personally use 10.04 but my colleague here Prashant the way says that 10.10 is also stable it is also having hardly any bugs so you please install either 10.04 or 10.10 and get started with Ubuntu all kinds of systems administration headaches are not there with Ubuntu but then we have people are in our group who use more advanced more different Linux versions which are not as easy for first time users okay there is a can you repeat less somebody has asked a question can you repeat less advanced and powerful Linux for academics is somebody called SJCK16 who has typed can you elaborate on that question what is that Linux or whether Linux is useful for academics or not yeah we believe it is extremely useful for academics yeah to use Microsoft Windows means to remain inefficient as a user for years and years to use Linux means spending a little more time for the first one month after that to become very efficient with file handling with all the tools that we are going to teach in the next two days and also two weeks from today so I am convinced that Linux is going to make us all very very efficient not just in academics for our personal use also there is one more question on chat can you repeat less the command less that I spoke about we will see in more detail in some time thank you very much we appreciate your questions we will certainly like to answer them due to time constraints we are going back to the slides thank you so Linux file hierarchy so slash itself is a root directory that is the earliest earliest directory the slash itself does not have a parent directory I am trying to say it is a top most level of the hierarchy you can also do something called man here man air now if you have many files if you have many users working on a computer then it is very important to know who should be allowed to modify which who should be allowed to read which files some people might be allowed to read another file but not write it for example all the commands like CP MV these are commands that the router has root the root root means systems administrator on every computer in Linux it is called the sysad is called the root the root has given access for using all these commands but not for removing those commands itself each of these commands are themselves files kept somewhere not inside the home directory but kept somewhere and they are all available for using also all these files themselves have to have execute permission so these are some information that we will study study now so this got permissions and access control in a multi user environment access control is vital so as I said we did LS minus L it says this information in which only the first letter D we said mean directory then there are next three letters again three expected letters three letters this is some information which we will not use in this course this means that particular file belongs to which group so every particular file belongs to a group of users belongs to a specific user inside that group so this is a group this is a specific user in the group there is some file this is a file size file size and bits of bytes or kilobytes megabytes this is something that you can figure out separately and this is a date when it was last modified please note this is not the date when it was created it is a date when that directory was modified that I should say also gets modified if a file inside it gets created now what are the RWX as I said there are there is a root who is like super there is there is a user there is that user belongs to a group and there are all the other people who who may not belong to that group but belong to that particular computer so the first R means read access to the user then write access to the user X means execute access if it is a command itself if it is a file that request to be executed then it should have execute permission please have a note about this when we go back to the shell we will test this so in this particular example root is a group users is itself the directory about which we are studying R stands for read access to the user W stands for the write access to the user X stands for execute access to the user the next R dash X means for the group and the last R something X stands for the rest of the people so what this says is there is no write access to others in the group there is no write access to all others perhaps not belonging to the group but they others do have read and execute access is extremely important for us to know perhaps if this is a very important confidential directory this is of concern to us that others can read this and read the directory they may or may not be able to read the files inside it but they can go to the directory and see which all files are there if a file has read access to all others then that is the potential concern this is the meaning of read write execute permissions of a file of a directory the first letter itself as I said it is a directory whether it is a directory or a file dash means if there is a dash it means that that particular expected character that particular permission is not there either the corresponding character is there if R is there if the read permission is there the R letter will appear there otherwise a dash letter will appear so the permissions can easily be changed by the owner of the file so since this particular topic is not required for other topics that we will do today I would recommend that you read this very carefully later today and ask doubts about this tomorrow CH mode is the important command to use for changing permissions we will certainly ask about this in the tests but because this topic is not required for other topics we will cover today only for that purpose we are skipping this please do not skip studying this I would like to point out all the explanation is very self-explanatory that is why so there is this as I said user u for user g for all others in one go a stand for all of them so if you are interested in giving or denying permission to a specific set of users then plus and minus is what you can use as I said please see the slides carefully later also each particular file has its own owner owner itself is the person who can change the permissions also the root perhaps can on some computers root also can change the read and write access execute access of the files so if you want to change the owner it is ownership itself of the file CH OWN can do it so that you can try to do this on your own computer so the super user is also another word for root root is the same as super user who is the systems administrator who has all the access to that computer only very responsible people should have all the access and we will like that in this course each one of you becomes such a super user now coming to how to view a text file so if there is a file and if it is not a very big file then you can use cat food or TXT that particular file called food or TXT can be viewed using cat command cat for concatenating all the different lines in that file and showing it on the screen you can also concatenate different files show them together on the screen important to note output comes on the screen and you come again to the prompt waiting the prompt means once you have the prompt means you are now in a position to type a new command again so cat file name you can also say cat file 1 file 2 file 3 these are expected to be ASCII files these are now it says not convenient to view long files why because the entire thing will come on the screen in one go and it will come and you will again end up with the prompt so if it is a really big file then you would rather want to see screen one screen at a time after you have seen it then you would like to go to the next screen for such a long file cat is not the right command to use even though it will still output the file output the content to the screen that is when you will use less if the file is really long you can use a command called less less will open the file and show you just one screen full at a time after you see one you can press space bar and go to the next you can also up down arrow marks to navigate through it finally after you have navigated enough when you want to quit from it Q is the command you have to remember to wait before you open the less otherwise we will not know how to exit from that less for more details about how to use less less minus H or man less is the command to use for seeing how to use this less is also very useful for if you want to now once I open the big file and now you are looking for only very specific information then you can use slash and type the pattern then it will go to that particular pattern slash default slash will search at this line and below if you want to look for above this particular line then question mark is what you can use for searching for a pattern above that particular line so less is a command to use for viewing a large file one can also search for a pattern inside that if there are many if you want to look for specific files specific words then you can use the command called WC word count that can give you the frequency of various frequency of occurrences of various words now if there is a very big file and there is a very specific information you are looking for only at the end of the file this very relevant when when you recently wrote an email and now you want to just find that email last because it was a recent part you expect that the sent mail will have only at the end the sent mail will have that relevant information only at the end that is when you can use tail for example if you think that some important information is only at the top then you can use head so these are very useful when you are opening a big file then less takes a long amount of time to just open the file I should say still the amount of time and speaking about is large or small it is all much less than any Microsoft windows method of opening a file yeah we are speaking of some very quick efficient ways of file handling that is a head and tail are useful it is useful for only seeing the first few lines or the last few lines of a file you can use minus n option for specifying the number of lines default I think it is 20 so you can also if you think that some file remains to be requires to be kept open and you want to keep viewing the end of the file minus f option is there these additional things can be seen using man tail now extremely important topic is called cut yeah when we are viewing all these text files then we will often require cutting some important information from a file then pasting it to another one this is the topic we will start seeing in more detail after the tea break I would for those who have not seen the slides I would recommend that you see the cut paste related slides very carefully now itself so that we can go a little faster in the afternoon we are stopping now thank you