Skip to playerSkip to main content
  • 9 months ago
Transcript
01:00Hello all.
01:15Very good evening.
01:16Thanks for joining the session.
01:18Let me share my screen.
01:20Just in a moment of time, let me share my screen.
01:26I have started the mission, AWS machine.
01:30I am just connecting to it, then I will share my screen in a moment of time.
01:46With my mission issue, I was not able to make it as a productive session.
01:52But let us do some productive session today.
01:57I am just sharing my screen now.
02:01If by chance my machine will struck even today as well, just be there for five minutes.
02:07I will join back.
02:08A temporary fix applied on my machine.
02:10It is working as expected seems to be.
02:13But by chance, if it will be struck, just give me five minutes of time.
02:17I'll be back.
02:18Okay.
02:19Fine.
02:20So yesterday we started understanding the Linux directory structure.
02:26We need to little speed up.
02:28Okay.
02:29So slowly I will explain, try to understand, but we need to speed up our things.
02:34Fine.
02:35So let me open the classroom notes.
02:38The last classroom notes.
02:39Let me open.
02:40So this is our last classroom notes.
02:44Right.
02:45And then yesterday we have not, you know, discussed much.
02:50So this is our last discussed session.
02:55So today let us understand, today let us understand the Linux directory structure.
03:04Then we will understand the users in the Linux distribution.
03:12But first let us understand the Linux directory structure.
03:18So let me give the today's date 14 June 22.
03:25And let me write the today's notes.
03:30Linux directory structure.
03:35Topic is Linux file system and directory structure.
03:43Linux directory assigned file structure.
03:51So carefully observe please.
03:52Very, very important.
03:53This session is very, very important for us.
03:58So in Linux distribution, so we will have the directory structure as this one.
04:12As you can see in the material notes, there is a root directory, which is called as the top-level directory.
04:25For example, in our Windows machine, C is the root directory.
04:34In C, we have the many directors, right?
04:37Like documents, maybe users, maybe program files, isn't it?
04:44So when you purchase a laptop or when you purchase a machine, by default, you will be coming up with one drive called C drive.
04:56Isn't it?
04:57So this is the top-level drive for all other directories.
05:03Similarly, in Linux, we have the slash is the top-level directory, parent directory or root directory.
05:14We call it as a root directory.
05:17So if we can go to our, this one.
05:22Now, let me enter print working directory.
05:27We are in slash home slash ubuntu.
05:30Now, what we will do?
05:32Let us go to dot dot slash and dot dot slash.
05:39Now, pwd.
05:41So we came back to now this directory.
05:45So this is what the root directory, isn't it?
05:50Now, this root directory or top-level directory or parent directory contains all other directories.
05:57In these all other directories, now let us check one by one.
06:02Let us understand one by one.
06:05So first directory, let us understand is the bin directory.
06:12First directory, let us understand is the root directory, sorry, boot directory slash boot directory.
06:19So slash boot directory.
06:21First of all, let me log in as a root user because that user have the access on all the
06:27directors, isn't it?
06:28So let me log in as a root user.
06:31And then let me go back to the root directory or parent directory.
06:37See, now we are at the parent directory.
06:40And if you can see ls, bin, dev, home, lib32, lib32, and media, opt, root, sbin, and then boot, etc, lib.
06:54So all these are out of all these things.
06:59What are all the directories is important is USR, Unix, share resources.
07:07The name is Unix, share resources.
07:10This is important.
07:11And then bar directory is important.
07:14And then bar directory is important.
07:15Bin directory important for binary files.
07:19Sbin is important, super admins binary files.
07:24And then mnt, mount, bar.
07:29So these are all the directories we frequently will work.
07:32Of course, home directory.
07:34However, let us understand each and every directory.
07:39So as part of our understanding, let us start with the slash boot.
07:45So this boot contains the files that is used by the kernel and boot loader.
07:53So let us go to boot directory.
07:58Now series, don't give the slash boot.
08:02No.
08:03We are already, we are already here.
08:06Now we want to go here.
08:08So let us go forward.
08:11That means we are already now here, isn't it?
08:14Now if you want to go, then we need to give like this.
08:17So there is a concept called relative path and absolute path.
08:20We will discuss in the coming up sessions.
08:23Now I was switched to the boot directory.
08:28Now let us ls-l is the command which is used to list the files and then the directories.
08:39So this is what we need to load down.
08:42This is what we need to load down.
08:45So already we know what is the meaning of the PWD, print working directory.
08:50Now the next working, next command is ls, ls command.
08:57So ls command, don't confuse you.
09:02Sorry, you are talking about the Linux, Linux directory structure, but talking about ls.
09:07Yes.
09:08This first, this command is required, right?
09:10In order to see the list of files in your directory, this command is required.
09:15So first command is what you know, cd.
09:18So that is very important.
09:20First command is cd.
09:21cd means for change directory.
09:25cd means for change directory.
09:28First command is cd.
09:29cd means for change directory.
09:31So what it is this, if we want to change it from one directory, one directory, that means
09:44the current directory, current directory, one directory.
09:49Directory nothing but folders in our windows machine.
09:53In Linux, we call them as a directory.
09:55There is no word called folder in Linux.
09:59We have to call it as a directory, not folder.
10:03We have to call it as a directory in Linux.
10:06Whereas in Windows, it is a folder.
10:11So cd meaning change directory.
10:14So if you want to change from one directory, preferably current directory to another directory,
10:23to another directory, to another directory, we have to use this command.
10:29We have to use this cd command, cd command.
10:36For example, for example, cd, cd, maybe once I logged in, we will be in this directory.
10:49Isn't it?
10:50We are going to hit the rate ip-192-168-72-03 and then there will be a tilde operator.
11:03And then there is a dollar.
11:05So we will be here when we logged in.
11:08Isn't it?
11:09So for example, current directory is, for example, current directory is this one.
11:20Current directory is this one.
11:21That means what is the current directory slash home slash Ubuntu is the current directory.
11:31Assume.
11:32Now, if you want to change, if we want to change to other directory, like root directory,
11:51then you can use this cd as below.
11:57So here we can use cd space slash root directory.
12:03So where we want to go, you should have to use it because we are in the home Ubuntu.
12:10We can go here.
12:12We were in the home Ubuntu.
12:17And from the home Ubuntu, sorry.
12:20Sorry.
12:21Yeah.
12:22So we are in the home home directory.
12:25Home directory.
12:26If you want to move to any other directory from home directory, we can use slash root
12:31like this cd.
12:33So that is the usage of the cd command.
12:36Next command is ls.
12:39Ls meaning listed.
12:41Ls meaning listed.
12:43List.
12:44So ls command is used to list the files and directories.
12:57Ls command is used to list the files and directories.
13:01Files and directories.
13:03For example, for example, for example, for example, when we say when we are in the Ubuntu,
13:12right?
13:13So when we are in this Ubuntu, for example, when we are in the Ubuntu, and if we type ls,
13:21then it will show us the directories, directories, something like this.
13:27Let me just duplicate this tab.
13:31Just let me duplicate this tab and then clear the console type ls.
13:38Then we don't see anything.
13:41Right.
13:42Let us go to a root directory.
13:46Now, just let us type ls.
13:51Right.
13:52So when we type ls, so go to root directory.
14:02Maybe let me check feedability.
14:05When we enter this feedability, assume now we are in this directory.
14:10So now when we are in this directory, now, when we are in this directory, if we type ls,
14:17then it will show us bin, sbin, usr, root, etc, then bar, etc.
14:34Right.
14:35So it will show us this directories.
14:37Directories.
14:38And also it will show us what if you can see here, just it shows the directories.
14:45Now, this command, this command don't show us the hidden directories.
14:55Hidden directories.
14:58Now, what are hidden directories?
15:02What are hidden directories?
15:05You are following me, right?
15:07So ls command is not showing the hidden directories.
15:10So if we say ls, it is just printing.
15:14It is not showing the hidden directory.
15:16But when I say lsfna, you can see there is a dot as well.
15:21For example, we are here, right?
15:23So we have the dot profile, dot basher, dot basherc.
15:29But when we say ls, it is not printing.
15:33The dot starts with the dot.
15:36So the directory are a file, which is starting with the dot is called as a hidden directory.
15:46So hidden directory or hidden file.
15:50So if it is starts with the dot, then that is a hidden.
15:55So that is not by default shown by the ls.
15:58For that reason, we will use ls-a command to showcase all the files directories in a particular
16:09directory.
16:10For example, where are we now?
16:13We are in the slash home slash ubuntu.
16:15We are here.
16:17Now, all our hidden files here, because starting with the dot, one moment.
16:31Sorry.
16:32So we are here with the dot.
16:34So this dot directories or dot files, starting with the dot, not able to see by using the
16:43ls command.
16:44So that is the reason we have used ls-a to showcase all the things.
16:49For example, maybe you don't know this one, meaning the meaning of this, maybe you don't
16:58at this moment, at this moment, just I will do this one.
17:03Now ls, I will, so I created one directory here.
17:07Now I'll explain what, how to create a directory in a later on time, but just to example, just
17:12to show one example, when we say ls, it is only pointing the non-hidden directories.
17:20But when we say ls-a all, so it is showing the hidden directories plus non-hidden directories.
17:28Both it is showing.
17:29So let us record this in our notes.
17:32What is first hidden directory?
17:35What is first hidden directory or files?
17:39Hidden directory or files.
17:42Okay.
17:43So the files are directories.
17:49The files are directories, which starts with the dot, starts with the symbol, starts with
18:01the symbol dot, are, are called as the hidden, are called as the hidden directories, hidden directories,
18:14hidden directories, hidden directories or files.
18:20So by default, ls command won't display this.
18:29We have to use, we have to use ls space hyphen a command to display, to display these hidden
18:41files, hidden files and directories.
18:46Make sense, right?
18:48Now you got the idea.
18:50Some were highlighted, some were highlighted.
18:53When you, when you typed ls minus in, now, then some directories were highlighted and some
19:00were non-highlighted.
19:01What is the meaning of those?
19:04Correct.
19:05So that is the meaning of the permissions basically.
19:08If you can see this dot SSH and that test, those came in some color, isn't it?
19:15For example, let us see ls hyphen l.
19:19Now see this test.
19:21So on this test directory, there is a permission read, write, execute, read, write, execute and
19:30read, but not write and execute.
19:32For the Ubuntu user, for the Ubuntu user group, for the Ubuntu user, and for the Ubuntu user role or group, all the permissions there on this test directory.
19:45But for the other users, there will be read and execute, but not the right permissions here.
19:50Not the right permissions here.
19:51So the blue color symbols are denoting the permissions series now.
19:57So for the Ubuntu user dot SSH, read, write, execute, but no other permissions for the Ubuntu user and then Ubuntu role, role meaning group actually.
20:14But when I point it on dot X authority, see only read, write, not execute permissions.
20:22But when I again put on the cache, so there is an execute permission.
20:27Again, I will keep it on the profile.
20:30So there is no execute, only read, write.
20:33You got it, right?
20:35Understood?
20:36No, sir, not understood.
20:41Okay, just let me one more time.
20:45Let me explain.
20:46Now, this test directory having X symbol.
20:51Correct?
20:52That means executable directory.
20:55Executable meaning you can, you can write something inside this.
21:01You can read some files from this directory and you can even execute any of the permissions commands on this directory.
21:11Later on time, you get to know.
21:13Right now, just understand the reason for this color is the colored directories have the executable permission.
21:23Executable permission, meaning any, any, in, in these directories, any commands we can execute.
21:32So right now you understand this blue color meaning executable, executable.
21:38Got it, sir.
21:40Got it, sir.
21:41Sir, other, other, other directory have no permission.
21:45Just show, sir.
21:46Yeah.
21:47See this?
21:48Are you able to see?
21:49Yes.
21:50They have read, write and read, read permission.
21:51Correct.
21:52Now let us see bash logout.
21:53Bash logout.
21:54Same permissions, sir.
21:55Same permission.
21:56Correct.
21:57Bash RC.
21:58Same permission.
21:59Exactly.
22:00X authority.
22:01Read, write.
22:02Read, write.
22:03Okay.
22:04That is the reason.
22:05And SSH.
22:06Yes.
22:07Yes.
22:08Yes.
22:09Yes.
22:10Yes.
22:11Yes.
22:12Yes.
22:13That is the reason.
22:14And SSH just shows, sir.
22:16SSH.
22:17Execute.
22:18Okay.
22:19They have execute permission.
22:21That is the reason it is in the blue color.
22:23Okay.
22:24Sir, but execute permission for owner or for the other one.
22:30That is, we will discuss for now for the user logged in user.
22:34Logged in user.
22:35Okay.
22:36Okay.
22:37Fine.
22:38So.
22:39Hello.
22:40Uh, for the bash RC, we have read, write and read, read access.
22:45So what is the difference between these two?
22:48Yeah.
22:49Bash RC read, write only no read, write execute, no execute.
22:55Okay.
22:56Only read, write.
22:57Okay.
22:58RR meaning read.
22:59So there are user, there is a group and there is other users as well.
23:04First two are the current logged in user and then current logged in users group.
23:08So then third R, the third R you can see, the third R is nothing but R hyphen hyphen.
23:15Those three symbol is nothing but the, for the other users.
23:18Meaning I am not logged in user, root user.
23:21Now Ubuntu user is the logged in user, not root user.
23:25So not maybe other users we are going to create in the future.
23:28So, so who is not logged in user currently is called as the other user.
23:33So other users have only the read permissions.
23:35That means.
23:36So don't worry.
23:37We will, we will, we will see this part.
23:40Users groups and then permissions part is operate a discussion.
23:44We will do that is three to four days of session.
23:46It will take.
23:47Okay.
23:48To understand completely.
23:49Yes.
23:51Okay.
23:52Yeah.
23:53Thanks.
23:54Yes.
23:55Move ahead.
23:56So hidden direct.
23:57Ls hyphen a using this command.
23:59It will show only the hidden director, sir.
24:02No, no, not only hidden.
24:03It will show non-hidden as well.
24:05See test is non-hidden.
24:06Okay.
24:07So it will show all hyphen a for all, a for all.
24:11So by default ls command won't display this, but we have to use ls hyphen a command to display
24:17the, okay, I have to change my text.
24:20I have a display the all directories, all directories and files, including, including
24:30hidden and non-hidden.
24:31Hidden will.
24:32Yeah.
24:33Hidden will be denoted by that dots in.
24:37Correct.
24:38Correct.
24:39Correct.
24:40Fine.
24:41So.
24:42Okay.
24:43Even by default, if we use ls, so it also display.
24:46All hidden, all directories.
24:47Right.
24:48But not hidden, but not hidden.
24:49Okay.
24:50So ls, uh, ls space.
24:51If I put star, then will it work and, uh, display all direct base?
24:52No, actually ls space star star.
24:53Yeah.
24:54Not, it's not seems it is even not printing the non-hidden as well.
24:57Yeah.
24:58Yeah.
24:59Yeah.
25:00So it is.
25:01Can we write ls minus LRT?
25:02That is okay.
25:03Yeah.
25:04Yeah.
25:05Yeah.
25:06Yeah.
25:07Yeah.
25:08Yeah.
25:09Yeah.
25:10Yeah.
25:11Yeah.
25:12Yeah.
25:13Yeah.
25:14Yeah.
25:15Yeah.
25:16I'll, that is the next command.
25:17I have to explain ls minus LRT or ls space iPhone L, or next to L space iPhone L, uh,
25:28LRT, uh, LTR and the T L or, so these are all the formats actually.
25:34I'll explain about this one.
25:36Next is this one only.
25:37Okay.
25:38Next is, I will explain about this.
25:39Okay.
25:40Fine.
25:41So now we have completed this one.
25:42Okay.
25:43So next, these are the hidden directories are hidden files.
25:46So next, this, we are talking about now a less common list to come in.
25:51So in the list, list to come in.
25:53First, we have seen the LS and LS have some problem, not problem, but it's have its own,
25:58uh, kind of a working.
26:00Okay.
26:01So let's go to here.
26:02So let's go to here.
26:03LS space, iPhone, iPhone, help.
26:04Let us say.
26:05So when we say help, LS space help a lot of, lot of, uh, help documentation, it is opened,
26:27right?
26:28Now, in this lot of, lot of documentation, there are the short forms of the commands.
26:39So here, if you can see, there is a hyphen L use a long listing format.
26:47Use a long listing format.
26:50What does it mean?
26:51First let us see.
26:52Okay.
26:53So clear everything.
26:55Now LS iPhone L.
26:58So this is showing what?
27:00This is showing the only non hidden directory, but it is showing all the things like when
27:11it has been created, what is the memory allocated to its size allocated to it, right?
27:17And then what is this, uh, permissions, right?
27:21What is its permission group, user, user group, right?
27:26Memory, all the things it is displaying.
27:30So L for what, uh, just let me, LS, iPhone, iPhone, help.
27:35Even I forgot.
27:36So L for, uh, L for long listing format.
27:42So long listing format, meaning it will display a clear, uh, information about a particular
27:49directory.
27:50Okay.
27:51So before LRT, let us see first L.
27:53What is L?
27:54LSF and a LSF and L.
27:58So this command.
27:59So yeah.
28:00One.
28:01Sorry.
28:02So this is L stands for long listing format.
28:19So this command is used to display the non hidden, non hidden directories and files.
28:32With the, with the, with the, with the additional, with the additional, additional information
28:45about the, about the number one, careful is number one.
28:52Number one, first, uh, show, number one, show it as a file or directory.
29:04Number two, show the permissions, permissions allowed, allowed for user permissions allowed
29:17for logged in user group and other users.
29:24And then three, show the user group, show the user group.
29:34And then four, show the, uh, logged in user name and group name.
29:45And show the date and time, date and time when it created.
29:56And finally show the, finally show the directory or file name.
30:05There is a lot here to understand.
30:08So an example, if we can take, so LS iPhone L, sorry, LS iPhone L.
30:18So this is an example.
30:20Total four, it is showing, but displaying only non hidden.
30:25So let me copy this.
30:29Let me copy this and then paste here.
30:34So this is for example, for example, so when we are at this Ubuntu, this one, so we know,
30:48right, this is the nothing but the command prompt.
30:51Sorry, here is the one.
30:55Sorry, my bad.
30:57My bad.
30:58Unfortunately, I clicked on this another atom IDE.
31:03So it opened.
31:04So just let me close it.
31:06Yes.
31:07And this is also not required to us.
31:10Let me close it.
31:12Yes.
31:13Yes.
31:14And this is whatever current current IDE.
31:16So for example, this is the year when you say LS iPhone L, then it displays here.
31:24So here first is what D D meaning for directory.
31:30So show it as a file or directory.
31:34So if it starts with D then it is a directory.
31:50And if it starts with iPhone, then it has a file.
32:00So if it starts with the iPhone, then it is a file.
32:03Then it is a file.
32:04If it starts with the D then it is a directory.
32:05If it starts with the D then it is a directory.
32:10Got it.
32:11So how to know that it is a file or directory.
32:17So what I will do now, just let me show it.
32:32Just let me clear everything.
32:35LS iPhone L.
32:37Now this test starting with the D. D mean for what?
32:45Director.
32:46Otherwise, now let me do one thing.
32:49For example, say notes dot D. D. D. D. D. D. D.
32:59So what I can do is, cat will create, cat, um, welcome, not cat, just let me create something.
33:12ECO, well-come notes dot D. D. D. D. Okay.
33:17okay now clear everything ls-l now what did you see this notes.txt is starting with hyphen
33:28because it is a file but test is starting with the d because it is a directory because
33:36it is a directory so to identify that this is a directory or this is a file what it is
33:44we just understand using this one if it is starting with the d then it is a directory if it is starting
33:50with hyphen then it is a file so that is where we need to understand so show it as a file
33:56or directory if it starts with hyphen if it starts with d then it is a directory and if
34:01it starts with hyphen then it is a file so for example for example so this example you
34:09refer in your notes so for example so let just let me copy this entire thing
34:21yes let me paste it here isn't it so by looking into it now you came to know right so what is
34:26this meaning for so here when we type the command ls-l then total eight files we have but it just
34:34shown so by looking into it notes dot txt is starting with hyphen so it is a file and the
34:41test is a directory because it is starting with that d so by just looking into it we can conclude
34:48what it is isn't it so the command ls-l is displaying all these things and also it is
34:54displaying what it is also displaying the permissions allowed see this read write execute read write
35:01execute read hyphen x so it is also displaying the permissions allowed for a logged in user first
35:08three are for the logged in user next three are for the logged in user role or group and then last three
35:15for any other user so show the permissions allowed for logged in user group and other users first three
35:23are for the logged in user next three yes yes we have given dot txt extension no so for every file
35:32creation we need to give dot txt or simply you have given yeah simply i have given any extension
35:41any extension so if you want to make it as a file even dot txt or dot text or dot csv whatever we can give
35:49or extension also you no need to give but it is a file or it is a test it is a file or it is a directory
35:57how it will be how the linux will be understand because how you are creating if you use the mkdir
36:04then it is a directory if it is chat or vi some other ways then it is a file
36:10so we can create so going forward in the section linux files we can now we are discussing about the
36:26linux files and directory structure and there is another session we will take that is on the
36:31linux directories and files creation so um can you please um go back to the slide
36:38okay so when you are listing there is a number two what is that means after the permissions
36:46so that is what i have listed here so first okay let me i'm just explaining it so now we are here
36:54so this d meaning the directory or file next this is the permissions show the permissions allowed for
37:00logged in user group and other users and this two two meaning for you the group users group
37:07so when we create the group the group numbers we have so this two meaning for the users group
37:15then how come the text file has user group one and the text directory has user group two
37:24why is that so text directory one and then text directory two
37:29just let me check this is the group or i believe it is the group just let me check one and one moment just
37:41one moment this is good observation so just let me do one more thing
37:46uh let me create uh one more file just yes echo uh maybe this is a link counters and
38:03yeah reference link sim links maybe symbolic links uh but tester just don't have the symbolic link
38:12okay okay
38:16uh it might be a symlink symbolic link about this part i will come up i will explain about this part
38:25so maybe i'll i'll i'll i'll see and then explain this part but sure i thought it as the user group but
38:32seems to be not because it is one we got so let us create now one more um file just in case uh echo echo
38:44um let me write uh linux notes in this uh
38:51uh linux iphone notes now lsfm l so if we can see here we have one
39:02here we have one here we have one again we got one again we got two so why two it got so it is the
39:14symbolic links it seems to me but i will explain about this part but i am also not sure little i'll
39:19explain about this part fine it's okay right yes that's okay fine so now let us go to uh the next
39:31thing maybe this i will change group or i will i will is it related to file or directory file or directory
39:41that file is one and directly no no no not like it should no no not like that it should be symbolic link
39:47it should be symbolic linkage there is a concept called symbolic links so how many links we have we
39:54we can see symbolic links so that is what it is showing but i'll come from just give me uh next today
40:01i'll come coming up to this one okay however now let us see the third command that is lsf and l i think
40:09you got the clarity where we have to use this lsf and l now in this let us use one more option now
40:17what is this is ls hyphen uh hyphen help so if we can see here there is uh one more called r r meaning
40:28reverse reverse order while sorting r meaning reverse order while sorting so let us uh give ls space hyphen r
40:40now if you can see test is first created notes dot txt is next created and the linux notes is just now
40:51created isn't it it is displaying us or are showing us within the order how they were created in a reverse
41:01order meaning recently created is showing at last and then last created is showing at first
41:09now what we'll do is let us list the files with the reverse order now see we got it so whatever the
41:18thing last created that came first then notes dot txt we created then linux notes we created so r
41:25meaning for what r meaning reverse reverse order so let us see about this one ls space hyphen r
41:35so here r stands for reverse r stands for reverse order meaning in the order how they were created
41:44to reverse it will display so this is the reverse stands for reverse order while sorting so it means
41:55means it means this will display the the directory or the files in the order how they created simple right
42:17this is just showing the directories or files in the order how they were created for example for example
42:28for example first we created a director we created a directory called test next second
42:40we created a file called we created a file called linux uh just let me note it down linux sorry notes dot txt
42:53notes dot txt and third we created a file called file called linux underscore notes linux underscore notes
43:11then then then when we give the command as below command as below command as below this one
43:28command as below
43:29right so it displays it displayed the directories and the files in the order how they got created
43:47make sense right next we can also use this uh command not command use this option
44:04that is that is r we can also use this option that is r along with the option
44:13l along with the option l as shown below right so we can also use this with the option ls-lr
44:31like this
44:36right so then as shown below
44:39then it is displaying the directories and files as a list in the order how they got created
45:00how they got created
45:03fine so this is about the ls-lr
45:08and there is another also t based on the timestamp if you want to see then there is an option called t also
45:19so ls-help now if you can see there is an option called small-t
45:29sort by the modification time newest first
45:33newest first so let us discuss about this command now
45:38so this is d and then this is e
45:43ls-t
45:47here t stands for here t stands for t stands for
45:54sort
45:56by modification time
45:59as the newest first come whichever is created first that will meaning whichever is created the newest ever
46:05latest will come first
46:07right so let us execute this first let me clear everything
46:16clear everything and ls iphone t
46:20now see linux nodes come first
46:24nodes.txt came next and then test came next right and that means what it is
46:30is showing so this command this option this option with the ls will show us the files
46:47files files files in the order in the order
46:55in the order
46:58the files in the order
47:00order by and by their creation yeah by their creation timestamps by their creation timestamps
47:12isn't it so you are understanding that ultimately this node should have to be understandable you
47:17so this option with the ls will show us the files files and directories
47:27in the order in the order in which in the order by their creation timestamps
47:35i think this doesn't make sense so this option with the ls will show us the files and directories
47:41in the order in the order in the order
47:46uh by the in the order in the order by the uh recently recently created first and uh then next
48:01so it's creating the first new year's two uh usually we execute ls hyphen lrt command no correct
48:13so uh in this case a hyphen r means older first uh it will show so older first uh when it comes to
48:20hyphen t it shows uh the recently modified first correct while giving uh the combined ls hyphen lrt
48:29how does it works actually actually yeah so let us give it so ls hyphen lr so it taken like how test
48:41came first notes dot txt next and then linux notes first meaning reverse taken the priority
48:49now what i will do is list tr now again test notes dot txt linux underscore notes now
48:59let us give that time and then reverse and then list again test notes dot txt and then linux notes
49:07so what we understood if we give the ls f and lrt then the uh older like r is taking the priority over
49:16the t got it so can you give ls minus lt ah so ls minus lp it is taking r as a priority why we need to
49:27give the t not required it is not the these are the options actually so these are the options that
49:34we can give with the ls command it is not mandatory that we have to give all three like ltr or no it is
49:42not mandatory we can give whatever lsf and l we can give lsf and lt we can give lsf and ltr we can give
49:49right usually people are habituated to use that commands lsf here yeah
49:54okay so now sir sir when we use this uh ls command uh like by default what is the oldest or newest uh
50:06yeah so just if you can give ls it is printing as linux nodes and then notes dot txt and then text so
50:15meaning based on the timestamp it is giving being newest first newest first yeah this is also a good
50:23point uh we will add it in our notes this is good observation so ls right so ls ls so hidden directories
50:34so this command doesn't show the directories and this command will show the files i think i have to
50:46if i update if i write these notes in a texture document that will be helpful right maybe
50:50let me write it so this command will show the files and the directories and the directories
51:00in an order like uh newest is first
51:07okay excuse me sir sir maybe it is showing that according to the alphabetic order
51:14can you create the uh another file okay okay yeah so echo uh echo
51:25welcome to devops uh and then and then you know um
51:33um amd amd amd linux notes amd linux notes okay now ls amd yeah it is showing the alphabetical so let me say
51:49echo um welcome to jupark jupark jupark jupark jup dot txt
51:59and ls yes alphabetical artistic not time stamp that's true let me also create one more file one more
52:09directory let me create so mkdir
52:13mkdr or mkdr or mkdr batron mkdr batron or mkdr um maybe barrel just something like that
52:28now ls yes it is displaying based on the alphabetical order let me update my notes
52:35so let us go here huh so fight this command will show the files and directories in an alphabetical order
52:51yeah thanks so now if we can go and then see the ls-lt and then lrt both now meaning ls-ls space
53:01lt it is showing based on the time stamp ls space hyphen lr so it is showing last created first so
53:12these are working as expected the only thing is ls is working with the um he's working with the uh
53:21alphabetical order so ls-l also showing the alphabetical order so this let us observe
53:27ls-l alphabetical order ls-l r reverse order ls-l t uh new is to come first r okay so these things we
53:43can capture in our notes
53:49so these things let us capture in our notes
53:56right so these are the possible combinations ls this is what actually
54:05actually case one case one showing the files and directories in a in an alpha vertical order
54:20and case two case two case two case two showing the files and directories in a in an reverse order
54:34in a reverse order reverse order of reverse order of reverse order of the time reverse order of the time
54:44they created reverse order that means oldest is the first reverse order that is oldest is the first
54:57oldest is the first and then case three case three
55:03okay so this is about the ls command this is about the ls command and now as we have seen all the
55:26possibilities of this ls command so we can go to go and then understand the directory structures
55:34okay so that's all for today because to i have to jump to another session now uh 8 pm session tomorrow
55:41onwards i will take till 8 15. okay tomorrow onwards i will take till 8 15. so any questions any any any
55:50any questions anything for me for today sir how can we create a empty file we can create using touch we
55:59can create are using the vi we can use uh using the uh empty file we can create so first vi we can use
56:08for example uh vi test one dot txt okay just exit double code this is one way our touch we can use test
56:22two dot dot dot txt this is another way and uh yeah these two ways we can create so we will discuss
56:31actually meaning the files creation files and directory creation there is
56:39user users and then permissions we'll discuss about the linux and then files at that moment we'll discuss
56:44so thank you sir one more thing where you can find this recordings like okay recordings will be uploaded
56:52directly to your gmail drive and uh notes you can find out so this is the notes right just now we created
56:59this notes you can find out in the google classroom our devops 2 classroom i have created in this
57:06classroom you can see these notes so but recordings you will receive in your uh gmail drive check ones not
57:16receive then check ones and already i think yeah yeah okay so we'll receive in uh notification right
57:24if someone has uploaded uh any recordings to our personal email address might be because no because i don't
57:32know how it will know how it will be uh because they have not uploaded to my drive how it will be i don't
57:38know maybe maybe even i did not receive so i just want tomorrow morning i have received sir from durga
57:45uh-huh yeah tomorrow morning you will receive correct tomorrow morning
57:50today also i got uh all the previous lectures uh correct correct and also yeah that is true correct
57:57correct correct okay so tomorrow let us discuss the linux file system so the let us continue to the
58:04today's session because now we got the ls command clear understanding tomorrow let us see this linux and
58:10then linux directories and file structure that's all for today folks thank you so much tomorrow just tell
58:17us i mean what is the meaning of that uh one and two yeah sure sure i will i will tell you because that is
58:24symbolic links if that is the case symbolically what is symbolic link and all also we'll discuss
58:28tomorrow and then i'll make you to understand i believe this is symbolic link someone have given
58:33the right context but i will confirm hello sir yes today i register please give me the google class link
58:41sure sure right away just let me save this notes so once the notes is saved you will get the notification
58:49and then i'll give this uh classroom link just uh just to register here okay just click on the link
58:58and then register to yourself yeah thank you so much folks see you tomorrow at the same time that is 7 pm
59:06thank you thank you thank you sir thank you
Comments

Recommended