Difference between revisions of "BOSS-Linux/C2/General-Purpose-Utilities/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with "{| border=1 |'''Time''' |'''Narration''' |- |00:00 |Hi, welcome to this spoken tutorial on General Purpose Utilities in Linux. |- |00:06 |In this tutorial we will make ourselv...")
 
Line 13: Line 13:
 
|-
 
|-
 
|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
Line 20: Line 20:
 
|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.
 
 
|-
 
|-
|00:44
+
|00:43
 +
|Ctrl Alt t helps to start a terminal in ubuntu.
 +
|-
 +
|00:48
 +
|This command may not work in all unix systems however.
 +
|-
 +
|00:52
 
|A general procedure to open a terminal is already explained in another spoken tutorial.
 
|A general procedure to open a terminal is already explained in another spoken tutorial.
 
|-
 
|-
|00:50
+
|00:58
|Type at the prompt '''echo space Hello World''' and press enter.
+
|Type at the prompt echo space Hello World and press enter.
 
|-
 
|-
|01:02
+
|01:08
|This prints the customary '''Hello World''' message on the screen.  
+
|This prints the customary Hello World message on the screen.  
 
|-
 
|-
|01:06
+
|01:14
|We can also use the '''echo''' command to display the value of a variable.
+
|We can also use the echo command to display the value of a variable.
 
|-
 
|-
|01:11
+
|01:19
|Type at the prompt '''echo space dollar SHELL''' in capital and press enter
+
|Type at the prompt echo space dollar SHELL in capital and press enter
 
|-
 
|-
|01:22
+
|01:30
 
|This outputs the present shell being used.
 
|This outputs the present shell being used.
 
|-
 
|-
|01:28
+
|01:36
|We can also use escape sequences with '''echo''' command.
+
|We can also use escape sequences with echo command.
 
|-
 
|-
|01:35
+
|01:42
 
| 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:46
|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 for new line and \c is a escape sequence which when used causes the prompt to be displayed on the same line.  
 
|-
 
|-
|01:55
+
|02:03
 
|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.
+
Enter a command back slash c and press enter.
 
|-
 
|-
|02:25
+
|02:32
|We will see that the prompt will be displayed after printing '''Enter a command''' on the same line.
+
|We will see that the prompt will be displayed after printing ‘enter a command ‘on the same line.
 
|-
 
|-
|02:31
+
|02:38
|You may want to know what version of '''Linux Kernel''' you are running.  
+
|You may want to know what version of Linux Kernel you are running.  
 
|-
 
|-
|02:35
+
|02:43
|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 .
+
|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:58
|To know what is your username, type at the prompt '''who space am space I''' and press enter.
+
|To know what is your username, type at the prompt who space am space I  and press enter.
 
|-
 
|-
|03:03
+
|03:11
| This in fact comes from the '''who''' command that enlists all the users currently logged into the system in case your system is a multiuser system.  
+
| This in fact comes from the who command that enlists all the users currently logged into the system in case your system is a multiuser system.  
 
|-
 
|-
|03:14
+
|03:21
 
|Sometimes your login password may get compromised and/or you may want to change it.  
 
|Sometimes your login password may get compromised and/or you may want to change it.  
 
|-
 
|-
|03:20
+
|03:28
|For this we have the '''passwd''' command. Type at the prompt '''p a s s w d''' and press enter
+
|For this we have the passwd command. Type at the prompt
 +
p-a-s-s-w-d and press enter
 
|-
 
|-
|03:30
+
|03:37
 
|When you type this command you would be asked to type the current password.  
 
|When you type this command you would be asked to type the current password.  
 
|-
 
|-
|03:35
+
|03:43
 
|Here I would be typing my system's current password.  
 
|Here I would be typing my system's current password.  
 
|-
 
|-
|03:41
+
|03:48
 
|When that is correctly entered ,you will have to enter your new password and then retype it to confirm.  
 
|When that is correctly entered ,you will have to enter your new password and then retype it to confirm.  
 
|-
 
|-
|03:55
+
|04:02
 
|But what if we have forgotten our current password?  
 
|But what if we have forgotten our current password?  
 
|-
 
|-
|03:59
+
|04:06
 
|Then also the password can be changed without knowing the current password, but that can only be done by the root user.  
 
|Then also the password can be changed without knowing the current password, but that can only be done by the root user.  
 
|-
 
|-
|04:06
+
|04:14
 
|Now who is a root user?  
 
|Now who is a root user?  
 
|-
 
|-
|04:10
+
|04:18
|He is a special user with extra privileges.
+
|He is a special person with extra privileges.
 
|-
 
|-
|04:15
+
|04:22
 
|To draw an analogy we can say a root user is similar to a user in Windows with Administrator status.  
 
|To draw an analogy we can say a root user is similar to a user in Windows with Administrator status.  
 
|-
 
|-
|04:23
+
|04:30
|We may be interested in knowing the system date and time. For this we have the '''date''' command.  
+
|We may be interested in knowing the system date and time. For this we have the date command.  
 
|-
 
|-
|04:28
+
|04:36
|Type '''date''' in the terminal and press enter  
+
|Type date in the terminal and press enter  
 
|-
 
|-
|04:34
+
|04:42
 
|It will show you the present system time and date.  
 
|It will show you the present system time and date.  
 
|-
 
|-
|04:38
+
|04:45
|As we can see the '''date''' command gives both date and time. This is a very versatile utility and has many options as well.
+
|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
+
|04;54
|Type at the prompt '''date space plus % (percentage sign) capital T ''' and press enter.
+
|Type at the prompt date space plus 'percent' sign capital T and press enter.
 
|-
 
|-
|04:59
+
|05:07
 
| It gives us only the time in hours minutes and seconds (hh:mm:ss) format.
 
| It gives us only the time in hours minutes and seconds (hh:mm:ss) format.
 
|-
 
|-
|05:05
+
|05:12
| Type at the prompt '''date space plus %(percentage sign) small h and press enter.
+
| Type at the prompt date space plus 'percentage sign small h and press enter.
 
|-
 
|-
|05:15
+
|05:23
 
| It gives the name of the month
 
| It gives the name of the month
 
|-
 
|-
|05:18
+
|05:25
|Type at the prompt, '''date space +%(plus percentage sign) small m and press enter.
+
|Type at the prompt, date space plus percentage sign small m and press enter.
 
|-
 
|-
|05:31
+
|05:38
 
| 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.
 
| 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
+
|05:50
| Type at the prompt  '''date space +% (plus percentage sign) small y''' and press enter .
+
| Type at the prompt  date space plus percentage sign small y and press enter .
 
|-
 
|-
|05:53
+
|06:01
 
| It gives the last two digit of the current year.
 
| It gives the last two digit of the current year.
 
|-
 
|-
|05:58
+
|06:05
 
| 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 .
 
| 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:34
 
| Here it is showing  February 11.  
 
| Here it is showing  February 11.  
 
|-
 
|-
|06:31
+
|6:39
 
|Another related command is the cal command. Though not as common this helps you to see the calender of any month and any year.
 
|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
 
|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.
+
| To see the current months calendar type at the prompt ‘cal’ and press enter.
 
|-
 
|-
|07:05
+
|06:56
 +
|To see the calendar of any arbitrary month say december 2070 type at the prompt ‘ cal space 12 space 2070 and press enter.
 +
|-
 +
|07:13
 
|This gives the calendar of December 2070
 
|This gives the calendar of December 2070
 
|-
 
|-
|07:11
+
|07:19
 
|Before moving ahead let us discuss a little bit about files and directories.  
 
|Before moving ahead let us discuss a little bit about files and directories.  
 
|-
 
|-
|07:19
+
|07:26
 
|In Linux almost everything is a file. Now the question is what is a file?  
 
|In Linux almost everything is a file. Now the question is what is a file?  
 
|-
 
|-
|07:26
+
|07:34
 
|In real file a file is where we store our documents and papers. Similarly a Linux file is a container for storing information.  
 
|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
+
|07:48
 
|Next what is a directory?
 
|Next what is a directory?
 
|-
 
|-
|07:44
+
|07:52
 
| A directory can be understood as a collection of files and other (sub)directories.  
 
| A directory can be understood as a collection of files and other (sub)directories.  
 
|-
 
|-
|07:50
+
|07:58
 
|A directory helps us in organising our files in a systematic manner .  
 
|A directory helps us in organising our files in a systematic manner .  
 
|-
 
|-
|07:56
+
|08:04
 
|This is like what we call folders in Windows.  
 
|This is like what we call folders in Windows.  
 
|-
 
|-
|08:01
+
|08:08
| 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.
+
| 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:27
|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.
+
|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:42
 
|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.  
 
|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
+
|08:56
|Type the command '''ls''' and press enter.  
+
|Type the command ls and press enter.  
 
|-
 
|-
|08:54
+
|09:01
 
|Now observe the output.  
 
|Now observe the output.  
 
|-
 
|-
|08:56
+
|09:04
 
|Files and subdirectories are generally shown with different colours.  
 
|Files and subdirectories are generally shown with different colours.  
 
|-
 
|-
|09:00
+
|09:08
|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.
+
|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:24
|This shows all the files including the hidden files. Hidden files here are filenames starting with dot (.))  
+
|This shows all the files including the hidden files(hidden files here are filenames starting with dot (.))  
 
|-
 
|-
|09:25
+
|09:33
 
|If we not only want to see the file but also get more information we can use the minus l option.  
 
|If we not only want to see the file but also get more information we can use the minus l option.  
 
|-
 
|-
|09:33
+
|09:40
|Just type the command ''' ls space minus small l''' and press enter.
+
|Just type the command ls space minus small l and press enter.
 
|-
 
|-
|09:43
+
|09:50
 
|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.
 
|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
+
|10:06
 
|ls can be used with many options which we will see later.
 
|ls can be used with many options which we will see later.
 
|-
 
|-
|10:03
+
|10:11
 
|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.  
 
|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
+
|10:23
|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.
+
|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:46
 
|Now all the files and directories information will be directed into the file named fileinfo.
 
|Now all the files and directories information will be directed into the file named fileinfo.
 
|-
 
|-
|10:46
+
|10:54
|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.
+
|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:12
|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.
+
|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:36
|Now when we press '''enter''' the command waits for input from the user.
+
|Now when we press enter the command waits for input from the user.
 
|-
 
|-
|11:34
+
|11:42
 
|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:50
|Now press '''Enter''' key to indicate the end of input.
+
|Now press enter key to indicate the end of input.
 
|-
 
|-
|11:49
+
|11:56
|Now press the '''Ctrl''' and '''D''' keys together.
+
|Now press the Ctrl and D keys together.
 
|-
 
|-
|11:58
+
|12:05
|If a file by name say '''file1''' already exist then the user input will be overwritten on this file.
+
|If a file by name say file1 already exist then the user input will be overwritten on this file.
 
|-
 
|-
|12:06
+
|12:13
|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.
+
|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:36
 
|There are several other commands that we could have discussed but we would keep it to this for now. Infact even for all the commands discussed there are many options and possibilities untouched here.
 
|There are several other commands that we could have discussed but we would keep it to this for now. Infact even for all the commands discussed there are many options and possibilities untouched here.
 
|-
 
|-
|12:43
+
|12:50
 
|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
+
|13:02
 
|More information on the same is available at the following link .
 
|More information on the same is available at the following link .
 
|-
 
|-
|13:02
+
|13:10
|This is Shambulingayya.N.D, Thanks for joining.  
+
|This script has been contributed by ----------------------(name of the translator) and this is -----------------------(name of the recorder) from --------------------------(name of the place)signing off . Thanks for joining.  
  
 
|}
 
|}

Revision as of 12:46, 4 December 2014

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 headstart 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:43 Ctrl Alt t helps to start a terminal in ubuntu.
00:48 This command may not work in all unix systems however.
00:52 A general procedure to open a terminal is already explained in another spoken tutorial.
00:58 Type at the prompt echo space Hello World and press enter.
01:08 This prints the customary Hello World message on the screen.
01:14 We can also use the echo command to display the value of a variable.
01:19 Type at the prompt echo space dollar SHELL in capital and press enter
01:30 This outputs the present shell being used.
01:36 We can also use escape sequences with echo command.
01:42 For this in Linux we need to use the -e (hyphen e) option.
01:46 Common escape sequences include \t (backslash t) for tab, \n for new line and \c is a escape sequence which when used causes the prompt to be displayed on the same line.
02:03 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 back slash c and press enter.

02:32 We will see that the prompt will be displayed after printing ‘enter a command ‘on the same line.
02:38 You may want to know what version of Linux Kernel you are running.
02:43 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:58 To know what is your username, type at the prompt who space am space I and press enter.
03:11 This in fact comes from the who command that enlists all the users currently logged into the system in case your system is a multiuser system.
03:21 Sometimes your login password may get compromised and/or you may want to change it.
03:28 For this we have the passwd command. Type at the prompt

p-a-s-s-w-d and press enter

03:37 When you type this command you would be asked to type the current password.
03:43 Here I would be typing my system's current password.
03:48 When that is correctly entered ,you will have to enter your new password and then retype it to confirm.
04:02 But what if we have forgotten our current password?
04:06 Then also the password can be changed without knowing the current password, but that can only be done by the root user.
04:14 Now who is a root user?
04:18 He is a special person with extra privileges.
04:22 To draw an analogy we can say a root user is similar to a user in Windows with Administrator status.
04:30 We may be interested in knowing the system date and time. For this we have the date command.
04:36 Type date in the terminal and press enter
04:42 It will show you the present system time and date.
04:45 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;54 Type at the prompt date space plus 'percent' sign capital T and press enter.
05:07 It gives us only the time in hours minutes and seconds (hh:mm:ss) format.
05:12 Type at the prompt date space plus 'percentage sign small h and press enter.
05:23 It gives the name of the month
05:25 Type at the prompt, date space plus percentage sign small m and press enter.
05:38 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:50 Type at the prompt date space plus percentage sign small y and press enter .
06:01 It gives the last two digit of the current year.
06:05 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:34 Here it is showing February 11.
6:39 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:48 To see the current months calendar type at the prompt ‘cal’ and press enter.
06:56 To see the calendar of any arbitrary month say december 2070 type at the prompt ‘ cal space 12 space 2070 and press enter.
07:13 This gives the calendar of December 2070
07:19 Before moving ahead let us discuss a little bit about files and directories.
07:26 In Linux almost everything is a file. Now the question is what is a file?
07:34 In real file a file is where we store our documents and papers. Similarly a Linux file is a container for storing information.
07:48 Next what is a directory?
07:52 A directory can be understood as a collection of files and other (sub)directories.
07:58 A directory helps us in organising our files in a systematic manner .
08:04 This is like what we call folders in Windows.
08:08 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:27 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:42 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:56 Type the command ls and press enter.
09:01 Now observe the output.
09:04 Files and subdirectories are generally shown with different colours.
09:08 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:24 This shows all the files including the hidden files(hidden files here are filenames starting with dot (.))
09:33 If we not only want to see the file but also get more information we can use the minus l option.
09:40 Just type the command ls space minus small l and press enter.
09:50 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.
10:06 ls can be used with many options which we will see later.
10:11 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:23 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:46 Now all the files and directories information will be directed into the file named fileinfo.
10:54 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:12 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:36 Now when we press enter the command waits for input from the user.
11:42 Whatever we type would be written into the file so type some text.
11:50 Now press enter key to indicate the end of input.
11:56 Now press the Ctrl and D keys together.
12:05 If a file by name say file1 already exist then the user input will be overwritten on this file.
12:13 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:36 There are several other commands that we could have discussed but we would keep it to this for now. Infact even for all the commands discussed there are many options and possibilities untouched here.
12:50 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.
13:02 More information on the same is available at the following link .
13:10 This script has been contributed by ----------------------(name of the translator) and this is -----------------------(name of the recorder) from --------------------------(name of the place)signing off . Thanks for joining.

Contributors and Content Editors

PoojaMoolya, Sandhya.np14