Filesystem color definition.
Hello, everyone, and this is the lecture where I am going to cover how each file or directory changes
its color in the next environment.
When you run ellis' minus LTG or else minus L or any other option, that will give you the listing of
files and directories.
You notice that each file or directory or link, they are showing up in different colors.
So what what really those color mean and how are they identified in Lennix environment?
This is a screenshot I have that I capture for my Linux machine.
And if you look at the screenshot, you'll see this all the way to the right.
There is these different files with different colors.
There are this yellow file, there's blue of them and there is green of them.
So in this lecture, this is what we exactly am going to cover, why there are different colors and
what is the representation of each color in Linux environment.
So let's go onto our next slide and we'll cover the first one.
Very first one is the blue blue.
Every time you do, Maricel, and you see any name that shows in blue color, it means it's a directory.
Anything that shows up in green, it's an executable recognized data file, meaning it has a Batia Shell
scripting in it.
And it is actual a script which has the executable permissions assigned to it.
So it may be possible the script does not have the shell defined in it, but the executable permissions
assigned to the file will make that file color green then sky blue color, which is a symbolic link
file.
Then you create a link from your home directory, let's say, to another location, and then you go
to that other location.
You will see the the linked file would show up in sky blue color.
As an example, if you wanted to create a link, you would run this command, which is KDDI slash home
slash I have solved.
This is where the source of the file is located.
You create a file, let's say, touch seet in my example, let's say Captain America, then you go into
slash temp.
That's where you want the link to be created and then you run the command line space dash as a symbolic
link to slash home slash I Opsahl and slash seet, which is Captain America, by the way.
I apologize.
I missed the slash right after home.
But anyway, we will cover all these steps and I'll show you exactly when we create a link how it shows
up in a different color.
Moving on.
And then we have yellow color files, yellow with the black background.
What are those.
Those are the actual device files that are usually found under slash dev.
Anything that is attached to your system, for example, mouse, keyboard or speaker or anything that
has like a skuzzy devices or are idee devices.
They show up in it, slash dev file system and they will show up as yellow color.
Then we have a pink color files.
Those are graphic image file like JPEG or any type of graphical that has graphic.
And of course you cannot cat that files.
You have to have a certain program to view that image and you could only view an image if you are logged
into your system through going through the GUI desktop, you can not view a graphical image file and
Putti session or SSA session.
Next, we have the red files.
Red files are the archived files.
When we have two or three files together and we put them in atah file by running the command tr.
So that container is called an archive file and those archive files are shown in red color.
Then we have red with black background as it's showing right now.
It is a broken link, which means if you have, if you create a symbolic link and that symbolic link
is created with incorrect procedure or incorrect way of writing commands, then it will show up.
Instead of sky blue color, it will show up red with black background.
So as an example, you will go into the slash home slash of all directory.
You create a file, let's say.
I hulk meaning Incredible Hulk, then you run the command L and minus S for symbolic link I Hulk slash
temp slash Hulk.
Now this one, Vince, once you run this command, it will show up in the red with black background.
Why?
Because in the command and space, Dash says we are not using the absolute path for the source file.
You have to specify and space minus s space slash home slash absol slash hulk and then the destination.
Then it would becomes clear blue.
Anyway, that's an example of use showing.
If you have a broken link, it will show up in red.
Then you could tell right away the link is created.
What's now going to work because it's broken.
It does not have the actual source of the file.
So these are the few lists, a few colors.
There might be more different colors.
And you could also modify these colors depending on what what color is your preferred method.
But I would say, you know, let's not let's not change any colors and and the Linux environment, because
this way you're going to have a problem and you jump around from one environment to another.
And please do remember, again, as I said before, not every Linux environment would have the exact
same colors or even have any colors of of any kind.
So let's log into my Linux machine.
And I have already logged into my Linux machine here and I have logged in with my decision.
So the first thing we will go over is the directory.
I am logged in as myself.
I am in my home directory and when I do X minus L tr you will see anything that is a directory is blue
coded color and you could verify it by looking at this.
The first column and the first bit is D that shows that it's a directory, then we have a color green.
So if you notice we have a file called homework and it has this executable permission X, X and X.
As soon as you assign X, X, X are executable, this becomes like a script Linux operating system,
treat it as a shell script and changes its color to green.
If I were to change it back or remove executable permission with a forever for all minus executable
Holmer and now if I do X minus L tr you will see the homework right here is no more green because we
have removed X, X and X from everyone.
So that's why.
And that's the, that's the, that's the way to identify if the colour is green or not.
If it's a script or not.
Next one.
We have a sky blue colour and that is for creating links.
So I'm going to make this a little smaller so I could I could read the example there.
So if I create if I go to my home directory, which I'm already in home, I have Sol and I create a
file called Touch Seet, meaning Captain America.
I will do list minus L tr and I'll verified, uh, let me make this a little smaller and make this bigger
this way.
So this way you can read it better.
OK, so I have verified that I have created a file Captain America and it's been Wikler of course it's
original file.
Now if I go into slash temp directory and I create a link to that Captain America file by typing link
space dash s as symbolic link to home, I have Afsal Captain America hit enter.
I co verified while I'm in temp territory I could run ls minus l tr again.
L tr will show me the listing in the time when they were created a modified and in reverse order, meaning
the latest one will be at the bottom.
So I'll hit enter and you will see the last one.
The bottom one is right here where I have C A is linked to this actual source file and you see it's
this sky blue color.
OK then.
And next one we have is yellow with.
Black background and also I did the FBI's files and the device files are located in slash dev directory.
So when I am in slash dev directory, let me clear the screen.
So I am in slash dev directory and when I do ls minus L or L tr and hit enter, you will see all those
files that shows up here are in yellow color.
And as you can see, while the terminals and there are keyboards, there are many other things that
you can look into, the network cores, network adapters, all those are the actual devices.
And remember, every time you see a device, the device, the bit that is assigned to a device, starts
with C and anything that does not have any assigned there.
But there it means it's just a regular file and anything that has D in it is what exactly?
Its directory.
So now we know that the device files.
Colors are in yellow.
Perfect.
Now let's go to R pink now for pink.
I do not have any, um, any file in my system that is an image file.
So I have to download an image file to actually show you how the color looks like.
So first let me go to my home directory home.
I have all clear the screen and now I need to first download.
How do I download?
There is a command.
I would use a W get that I would use to download an image from the Internet.
So for from for right now, what it does is it actually um, it gets anything that we specify as an
as you are have to get so w get I'm telling it to get a file from, from a U rl where is that you url
for the URL.
I have to go and to um like Google and I will type in let's say colors, uh, color, anything that
you want to type images file and let's say this is the image, I want to download balloons for example.
I would do a right click on it and I will say copy image, location.
This is going to copy exactly where the image is located.
I'll go back to my PUDI session and here I will right click.
And I have specified the exact link where that file is located and now I will enter.
OK, it is saying that it is giving me a broken syntax error, an unexpected token.
So there is not something.
Right, but anyway, I'll I'll go ahead and I will download a different image, but this one will copy
image location.
I think it is the location.
I will run the comment again and hit enter.
OK, so now this time it worked.
I don't know the image location for the other pilot was probably somewhere or has a broken link somewhere.
Anyway, my point is to actually show you how we could have an image file and download an image file
be downloaded.
This image file called IMG Underscore Color Map Dot Jeff.
And it is downloaded in my home directory because when I ran to get command, it actually downloaded
in the current or existing directories.
Now when I do X minus LTE tr, that image file will show up in pink.
Uh ok so I did Ellis' minus l tr oh maybe it's showing up as an older file.
That's why it's showing up all the way up there.
OK, so that's the file because it's somehow showing up on January 26, 2016.
So that's not the time when we downloaded maybe that's the time and it was created by the author, whoever
put it in there.
So anyway, um, if I do this myself, then you will see that in the middle.
So now it's showing up in pink color.
If I do cat on it, I cannot view the image file.
I have shown how to do how to view an image file in my later sections and the additional resources section.
You could go back and check it out.
The next one is the archive file, the top file.
So if I have a list of files, for example, um, right here I have a file, a Captain America, I have
a file James file Peter.
Or instead of just that, I want you to create files called A, B, C and D, you could or you could
create all those files in one shot and hit enter and s minus L tr and you will see your files are created
as it is showing up right here.
Now I wanted to put all these four files in a container so I will use a command tr c v f so tau cbf
is the option to put the files into that container before we put the file in the container.
We have to give the name to that container.
So we will say, for example, all dottore and now what are we going to put into this container.
We want to put in file A, B, C and D. So now it'll go in.
So it actually not actually removing it and putting it into a container, it actually copying it and
putting into a container.
So the source file still stays there, but the container has a copy of those.
So if I do this myself, tr now and now you will see the source files are still there, but the container
file is shown as all red and that's what I the archive files.
So my purpose is to show you the red and how it shows up on the Linux file system and everyone else
myself to you.
All right.
So the last one I have is a red with black background, and that is for broken links.
So if I create a file in my home directory, so if I go to my home directory home I have of which I'm
already in and I create a file call Hulk, Incredible Hulk, I, Hulk do else tr and you will see it's
all the way at the bottom.
Perfect.
Now if I create a link l n space.
S I hulk.
And I wanted to be linked on temp hulk and hit enter now.
When I go to temp directory and I do X minus L tr you will see I Hulk there is a link and it is linked
to a file called Hulk, but it is broken and that is why it is showing up in the red color.
So that's the one the red color is showing up.
If I have to fix this, I have to specify the absolute path, meaning I ran this command and instead
of this command, I would have to run slash home, slash absol, slash Hulk.
And when I run this command, it says to my symbolic link, I understand first I have to remove that,
remove I Hulk.
And now if I run this command now, it will work now if I do this myself.
Here you see Hulk is in blue collar, so source father has to be specified as an absolute path.
Now you notice I have two of them red with black background showing up as broken link and just red with
archive.
And you probably noticed, hey, they are the both the same.
No, because if I had the white background right now by default, my putty screen has a black background.
So if I had a white background then you would have seen red as just red and black meaning on the white
screen black.
The broken link would show as a black background on that little text and would text would have itself
a red on it.
All right.
So anyway, this is the topic of the file system and color definition.
All right.
Good luck.