Difference between revisions of "BOSS-Linux/C2/General-Purpose-Utilities/English-timed"
From Script | Spoken-Tutorial
PoojaMoolya (Talk | contribs) |
Sandhya.np14 (Talk | contribs) |
||
Line 4: | Line 4: | ||
|- | |- | ||
|00:00 | |00:00 | ||
− | |Hi, welcome to this spoken tutorial on General Purpose Utilities in Linux. | + | |Hi, welcome to this spoken tutorial on '''General Purpose Utilities''' in '''Linux'''. |
|- | |- | ||
|00:06 | |00:06 | ||
− | |In this tutorial we will make ourselves acquainted with some of the most basic yet heavily used commands of Linux. | + | |In this tutorial, we will make ourselves acquainted with some of the most basic yet heavily used commands of Linux. |
|- | |- | ||
|00:14 | |00:14 | ||
− | |The main motivation of this is to give you a | + | |The main motivation of this is to give you a head-start about working with Linux. |
|- | |- | ||
|00:21 | |00:21 | ||
− | |The first command that we will see is the '''echo''' command. However note that linux commands are case sensitive. | + | |The first command that we will see is the '''echo''' command. However, note that '''linux commands''' are '''case sensitive'''. |
|- | |- | ||
|00:29 | |00:29 | ||
− | |Here all commands and their options are in small letters unless otherwise mentioned. | + | |Here, all commands and their options are in small letters unless otherwise mentioned. |
|- | |- | ||
|00:36 | |00:36 | ||
− | |This command is used to display some message on the screen. Switch to the terminal. | + | |This command is used to display some message on the screen. Switch to the '''terminal'''. |
|- | |- | ||
Line 26: | Line 26: | ||
|- | |- | ||
|00:50 | |00:50 | ||
− | |Type at the prompt '''echo space Hello World''' and press | + | |Type at the prompt: '''echo space Hello World''' and press '''Enter'''. |
|- | |- | ||
|01:02 | |01:02 | ||
Line 35: | Line 35: | ||
|- | |- | ||
|01:11 | |01:11 | ||
− | |Type at the prompt '''echo space dollar SHELL''' in capital and press | + | |Type at the prompt: '''echo space dollar SHELL''' in capital and press '''Enter'''. |
|- | |- | ||
|01:22 | |01:22 | ||
− | |This outputs the present shell being used. | + | |This outputs the present '''shell''' being used. |
|- | |- | ||
|01:28 | |01:28 | ||
− | |We can also use escape sequences with '''echo''' command. | + | |We can also use '''escape sequences''' with '''echo''' command. |
|- | |- | ||
|01:35 | |01:35 | ||
− | | For this in Linux we need to use the -e (hyphen e) option. | + | | For this, in Linux we need to use the -e (hyphen e) option. |
|- | |- | ||
|01:39 | |01:39 | ||
− | |Common escape sequences include \t (backslash t) for tab, \n (backslash n) for new line and \c (backslash c) is a escape sequence which when used causes the prompt to be displayed on the same line. | + | |Common escape sequences include \t (backslash t) for tab, \n (backslash n) for new line and \c (backslash c) is a escape sequence which when used, causes the prompt to be displayed on the same line. |
|- | |- | ||
|01:55 | |01:55 | ||
|This can be useful if say we want a prompt message before entering something. Type at the prompt | |This can be useful if say we want a prompt message before entering something. Type at the prompt | ||
'''echo space minus e''' within single quote | '''echo space minus e''' within single quote | ||
− | '''Enter a command \c (backslash c)''' and press | + | '''Enter a command \c (backslash c)''' and press '''Enter'''. |
|- | |- | ||
|02:25 | |02:25 | ||
Line 61: | Line 61: | ||
|- | |- | ||
|02:35 | |02:35 | ||
− | |To know this and many other characteristics of our machine we have the '''uname''' command.Type at the prompt | + | |To know this and many other characteristics of our machine, we have the '''uname''' command. Type at the prompt: '''uname space hyphen r''' and press '''Enter'''. |
|- | |- | ||
|02:51 | |02:51 | ||
− | |To know what is your username, type at the prompt '''who space am space I''' and press | + | |To know what is your username, type at the prompt: '''who space am space I''' and press '''Enter'''. |
|- | |- | ||
|03:03 | |03:03 | ||
− | | This in fact comes from the '''who''' command that enlists all the users currently logged into the system in case your system is a | + | | This in fact comes from the '''who''' command that enlists all the users currently logged into the system, in case your system is a multi-user system. |
|- | |- | ||
|03:14 | |03:14 | ||
Line 73: | Line 73: | ||
|- | |- | ||
|03:20 | |03:20 | ||
− | |For this we have the '''passwd''' command. Type at the prompt '''p a s s w d''' and press | + | |For this, we have the '''passwd''' command. Type at the prompt: '''p a s s w d''' and press '''Enter'''. |
|- | |- | ||
|03:30 | |03:30 | ||
Line 103: | Line 103: | ||
|- | |- | ||
|04:28 | |04:28 | ||
− | |Type '''date''' in the terminal and press | + | |Type '''date''' in the terminal and press '''Enter'''. |
|- | |- | ||
|04:34 | |04:34 | ||
Line 112: | Line 112: | ||
|- | |- | ||
|04:47 | |04:47 | ||
− | |Type at the prompt '''date space plus % (percentage sign) capital T ''' and press | + | |Type at the prompt '''date space plus % (percentage sign) capital T ''' and press '''Enter'''. |
|- | |- | ||
|04:59 | |04:59 | ||
Line 118: | Line 118: | ||
|- | |- | ||
|05:05 | |05:05 | ||
− | | Type at the prompt '''date space plus %(percentage sign) small h and press | + | | Type at the prompt '''date space plus %(percentage sign) small h and press '''Enter'''. |
|- | |- | ||
|05:15 | |05:15 | ||
− | | It gives the name of the month | + | | It gives the name of the month. |
|- | |- | ||
|05:18 | |05:18 | ||
− | |Type at the prompt, '''date space +%(plus percentage sign) small m and press | + | |Type at the prompt, '''date space +%(plus percentage sign) small m and press '''Enter'''. |
|- | |- | ||
|05:31 | |05:31 | ||
Line 130: | Line 130: | ||
|- | |- | ||
|05:42 | |05:42 | ||
− | | Type at the prompt '''date space +% (plus percentage sign) small y''' and press | + | | Type at the prompt '''date space +% (plus percentage sign) small y''' and press '''Enter'''. |
|- | |- | ||
|05:53 | |05:53 | ||
Line 136: | Line 136: | ||
|- | |- | ||
|05:58 | |05:58 | ||
− | | We can combine these options as well. For example type at the prompt date space plus within double quotes percentage small h percentage small y and press | + | | We can combine these options as well. For example type at the prompt date space plus within double quotes percentage small h percentage small y and press '''Enter'''. |
|- | |- | ||
|06:27 | |06:27 | ||
Line 145: | Line 145: | ||
|- | |- | ||
|06:41 | |06:41 | ||
− | | To see the current months calendar, type at the prompt '''cal''' and press | + | | To see the current months calendar, type at the prompt '''cal''' and press '''Enter'''. |
|- | |- | ||
|06:48 | |06:48 | ||
− | |To see the calendar of any arbitrary month say december 2070 type at the prompt '''cal space 12 space 2070''' and press | + | |To see the calendar of any arbitrary month say december 2070 type at the prompt '''cal space 12 space 2070''' and press '''Enter'''. |
|- | |- | ||
|07:05 | |07:05 | ||
− | |This gives the calendar of December 2070 | + | |This gives the calendar of December 2070. |
|- | |- | ||
|07:11 | |07:11 | ||
Line 175: | Line 175: | ||
|- | |- | ||
|08:01 | |08:01 | ||
− | | When we login into the Linux system we are by default in a home directory. To see the home directory type at the prompt '''echo space dollar HOME''' (in capital) and press | + | | When we login into the Linux system we are by default in a home directory. To see the home directory type at the prompt '''echo space dollar HOME''' (in capital) and press '''Enter'''. |
|- | |- | ||
|08:20 | |08:20 | ||
− | |The next command helps us to see the directory we are currently working in. It is '''pwd''', that stands for present working directory. Type at the prompt '''pwd''' and press | + | |The next command helps us to see the directory we are currently working in. It is '''pwd''', that stands for present working directory. Type at the prompt '''pwd''' and press '''Enter'''. |
|- | |- | ||
|08:35 | |08:35 | ||
Line 184: | Line 184: | ||
|- | |- | ||
|08:49 | |08:49 | ||
− | |Type the command '''ls''' and press | + | |Type the command '''ls''' and press '''Enter'''. |
|- | |- | ||
|08:54 | |08:54 | ||
Line 190: | Line 190: | ||
|- | |- | ||
|08:56 | |08:56 | ||
− | |Files and | + | |Files and sub-directories are generally shown with different colours. |
|- | |- | ||
|09:00 | |09:00 | ||
− | |ls is a very versatile command and has many options. Let us see some of them, Type at the prompt ''' ls space minus minus all''' and press | + | |ls is a very versatile command and has many options. Let us see some of them, Type at the prompt ''' ls space minus minus all''' and press '''Enter'''. |
|- | |- | ||
|09:17 | |09:17 | ||
Line 202: | Line 202: | ||
|- | |- | ||
|09:33 | |09:33 | ||
− | |Just type the command ''' ls space minus small l''' and press | + | |Just type the command ''' ls space minus small l''' and press '''Enter'''. |
|- | |- | ||
|09:43 | |09:43 | ||
Line 214: | Line 214: | ||
|- | |- | ||
|10:15 | |10:15 | ||
− | |Just type the command followed by the right angle bracket and the file name. Say we write '''ls space minus small l space right angle bracket space fileinfo''' and press | + | |Just type the command followed by the right angle bracket and the file name. Say we write '''ls space minus small l space right angle bracket space fileinfo''' and press '''Enter'''. |
|- | |- | ||
|10:39 | |10:39 | ||
Line 220: | Line 220: | ||
|- | |- | ||
|10:46 | |10:46 | ||
− | |But how do we see the content of this file? For this we have the '''cat''' command. Just type '''cat space''' and the name of the file , here it is '''fileinfo''' and press | + | |But how do we see the content of this file? For this we have the '''cat''' command. Just type '''cat space''' and the name of the file , here it is '''fileinfo''' and press '''Enter'''. |
|- | |- | ||
|11:04 | |11:04 | ||
− | |Now you can see its contents. Infact the other main use of '''cat''' is to create a file. For this type at the prompt '''cat''' space right angle bracket space filename say '''file1''' and press | + | |Now you can see its contents. Infact the other main use of '''cat''' is to create a file. For this type at the prompt '''cat''' space right angle bracket space filename say '''file1''' and press '''Enter'''. |
|- | |- | ||
|11:28 | |11:28 | ||
− | |Now when we press ''' | + | |Now when we press '''Enter''', the command waits for input from the user. |
|- | |- | ||
|11:34 | |11:34 | ||
− | |Whatever we type would be written into the file so type some text. | + | |Whatever we type would be written into the file; so type some text. |
|- | |- | ||
|11:43 | |11:43 | ||
− | |Now press '''Enter''' key to indicate the end of input. | + | |Now, press '''Enter''' key to indicate the end of input. |
|- | |- | ||
|11:49 | |11:49 | ||
− | |Now press the '''Ctrl''' and '''D''' keys together. | + | |Now, press the '''Ctrl''' and '''D''' keys together. |
|- | |- | ||
|11:58 | |11:58 | ||
− | |If a file by name say '''file1''' already | + | |If a file by name say '''file1''' already exists then the user input will be overwritten on this file. |
|- | |- | ||
|12:06 | |12:06 | ||
− | |Now if you wish to append to the end of an existing file '''file1''' type at the prompt '''cat space double right angle bracket space file1''' and press | + | |Now if you wish to append to the end of an existing file '''file1''', type at the prompt: '''cat space double right angle bracket space file1''' and press '''Enter'''. |
|- | |- | ||
|12:28 | |12:28 | ||
− | |There are several other commands that we could have discussed but we would keep it to this for now. | + | |There are several other commands that we could have discussed but we would keep it to this for now. In fact even for all the commands discussed, there are many options and possibilities untouched here. |
|- | |- | ||
|12:43 | |12:43 | ||
− | |This brings us to the end of this spoken tutorial.Spoken Tutorials are a part of the Talk to a Teacher project, supported by the National Mission on Education through ICT. | + | |This brings us to the end of this spoken tutorial. Spoken Tutorials are a part of the "Talk to a Teacher" project, supported by the National Mission on Education through ICT. |
|- | |- | ||
|12:55 | |12:55 | ||
Line 253: | Line 253: | ||
|- | |- | ||
|13:02 | |13:02 | ||
− | |This is Shambulingayya.N.D | + | |This is Shambulingayya.N.D. Thanks for joining. |
|} | |} |
Revision as of 18:14, 10 August 2015
Time | Narration |
00:00 | Hi, welcome to this spoken tutorial on General Purpose Utilities in Linux. |
00:06 | In this tutorial, we will make ourselves acquainted with some of the most basic yet heavily used commands of Linux. |
00:14 | The main motivation of this is to give you a head-start about working with Linux. |
00:21 | The first command that we will see is the echo command. However, note that linux commands are case sensitive. |
00:29 | Here, all commands and their options are in small letters unless otherwise mentioned. |
00:36 | This command is used to display some message on the screen. Switch to the terminal. |
00:44 | A general procedure to open a terminal is already explained in another spoken tutorial. |
00:50 | Type at the prompt: echo space Hello World and press Enter. |
01:02 | This prints the customary Hello World message on the screen. |
01:06 | We can also use the echo command to display the value of a variable. |
01:11 | Type at the prompt: echo space dollar SHELL in capital and press Enter. |
01:22 | This outputs the present shell being used. |
01:28 | We can also use escape sequences with echo command. |
01:35 | For this, in Linux we need to use the -e (hyphen e) option. |
01:39 | Common escape sequences include \t (backslash t) for tab, \n (backslash n) for new line and \c (backslash c) is a escape sequence which when used, causes the prompt to be displayed on the same line. |
01:55 | This can be useful if say we want a prompt message before entering something. Type at the prompt
echo space minus e within single quote Enter a command \c (backslash c) and press Enter. |
02:25 | We will see that the prompt will be displayed after printing Enter a command on the same line. |
02:31 | You may want to know what version of Linux Kernel you are running. |
02:35 | To know this and many other characteristics of our machine, we have the uname command. Type at the prompt: uname space hyphen r and press Enter. |
02:51 | To know what is your username, type at the prompt: who space am space I and press Enter. |
03:03 | This in fact comes from the who command that enlists all the users currently logged into the system, in case your system is a multi-user system. |
03:14 | Sometimes your login password may get compromised and/or you may want to change it. |
03:20 | For this, we have the passwd command. Type at the prompt: p a s s w d and press Enter. |
03:30 | When you type this command you would be asked to type the current password. |
03:35 | Here I would be typing my system's current password. |
03:41 | When that is correctly entered ,you will have to enter your new password and then retype it to confirm. |
03:55 | But what if we have forgotten our current password? |
03:59 | Then also the password can be changed without knowing the current password, but that can only be done by the root user. |
04:06 | Now who is a root user? |
04:10 | He is a special user with extra privileges. |
04:15 | To draw an analogy we can say a root user is similar to a user in Windows with Administrator status. |
04:23 | We may be interested in knowing the system date and time. For this we have the date command. |
04:28 | Type date in the terminal and press Enter. |
04:34 | It will show you the present system time and date. |
04:38 | As we can see the date command gives both date and time. This is a very versatile utility and has many options as well. |
04:47 | Type at the prompt date space plus % (percentage sign) capital T and press Enter. |
04:59 | It gives us only the time in hours minutes and seconds (hh:mm:ss) format. |
05:05 | Type at the prompt date space plus %(percentage sign) small h and press Enter. |
05:15 | It gives the name of the month. |
05:18 | Type at the prompt, date space +%(plus percentage sign) small m and press Enter. |
05:31 | It gives the month of the year in numerical format. Here it is showing 02 for the month of February . Match this according to the output you are getting. |
05:42 | Type at the prompt date space +% (plus percentage sign) small y and press Enter. |
05:53 | It gives the last two digit of the current year. |
05:58 | We can combine these options as well. For example type at the prompt date space plus within double quotes percentage small h percentage small y and press Enter. |
06:27 | Here it is showing February 11. |
06:31 | Another related command is the cal command. Though not as common this helps you to see the calender of any month and any year. |
06:41 | To see the current months calendar, type at the prompt cal and press Enter. |
06:48 | To see the calendar of any arbitrary month say december 2070 type at the prompt cal space 12 space 2070 and press Enter. |
07:05 | This gives the calendar of December 2070. |
07:11 | Before moving ahead let us discuss a little bit about files and directories. |
07:19 | In Linux almost everything is a file. Now the question is what is a file? |
07:26 | In real file a file is where we store our documents and papers. Similarly a Linux file is a container for storing information. |
07:40 | Next what is a directory? |
07:44 | A directory can be understood as a collection of files and other (sub)directories. |
07:50 | A directory helps us in organising our files in a systematic manner . |
07:56 | This is like what we call folders in Windows. |
08:01 | When we login into the Linux system we are by default in a home directory. To see the home directory type at the prompt echo space dollar HOME (in capital) and press Enter. |
08:20 | The next command helps us to see the directory we are currently working in. It is pwd, that stands for present working directory. Type at the prompt pwd and press Enter. |
08:35 | Once we know of our directory we would also want to know what are the files and subdirectories in that directory. For this we have the ls command which is probably the most widely used command in Unix and Linux. |
08:49 | Type the command ls and press Enter. |
08:54 | Now observe the output. |
08:56 | Files and sub-directories are generally shown with different colours. |
09:00 | ls is a very versatile command and has many options. Let us see some of them, Type at the prompt ls space minus minus all and press Enter. |
09:17 | This shows all the files including the hidden files. Hidden files here are filenames starting with dot (.)) |
09:25 | If we not only want to see the file but also get more information we can use the minus l option. |
09:33 | Just type the command ls space minus small l and press Enter. |
09:43 | It gives us the file permissions, file owner's name, last modification time,file size in bytes etc. Explanation of the fields of this option is beyond the scope of the present tutorial. |
09:58 | ls can be used with many options which we will see later. |
10:03 | Instead of just displaying all these information on the screen, we may store it in a file. In fact we can store the output of any command in a file in this way. |
10:15 | Just type the command followed by the right angle bracket and the file name. Say we write ls space minus small l space right angle bracket space fileinfo and press Enter. |
10:39 | Now all the files and directories information will be directed into the file named fileinfo. |
10:46 | But how do we see the content of this file? For this we have the cat command. Just type cat space and the name of the file , here it is fileinfo and press Enter. |
11:04 | Now you can see its contents. Infact the other main use of cat is to create a file. For this type at the prompt cat space right angle bracket space filename say file1 and press Enter. |
11:28 | Now when we press Enter, the command waits for input from the user. |
11:34 | Whatever we type would be written into the file; so type some text. |
11:43 | Now, press Enter key to indicate the end of input. |
11:49 | Now, press the Ctrl and D keys together. |
11:58 | If a file by name say file1 already exists then the user input will be overwritten on this file. |
12:06 | Now if you wish to append to the end of an existing file file1, type at the prompt: cat space double right angle bracket space file1 and press Enter. |
12:28 | There are several other commands that we could have discussed but we would keep it to this for now. In fact even for all the commands discussed, there are many options and possibilities untouched here. |
12:43 | This brings us to the end of this spoken tutorial. Spoken Tutorials are a part of the "Talk to a Teacher" project, supported by the National Mission on Education through ICT. |
12:55 | More information on the same is available at the following link . |
13:02 | This is Shambulingayya.N.D. Thanks for joining. |