Instructor: Linux file types.
Did you know there are several different types
of files in Linux?
That includes directories,
plain text files, links, block files, and so on.
Let's look at them one by one.
The first one is a regular file.
Anything that does not have a letter associated
to it at the beginning of it, it's a regular file.
When I say beginning, meaning when you run LS minus L
in your directory.
These are the most common type of files
and include text files, executable files, images,
videos, and more.
They can contain any kind of data. Alright.
Then comes directory.
Anything that starts with D is a directory.
Now, in Windows operating system it is called a folder.
The next one is the link.
Any attribute of a file that has a L in front
of it is a link.
These are special files that point
to other files or directories.
Now, there are two types of link, soft link
and hard links, which we will discuss later in this course.
Okay, then anything starts
with C is a special character device file.
These files represents hardware devices,
meaning if you attach, let's say a keyboard,
serial port CPU,
or a memory to your system, the operating system creates it
as a file starting with C.
Also, another device file is block device file.
These files represents hardware devices that handle data
in blocks, such as hard drives or USB drives.
The identification of these file is starting with B.
The next one is the socket file, which starts with S.
These files are used for network communication
between processes, allowing data exchange between them.
Okay, then we have named pipe file that starts with P.
Also represents or known as FIFO.
FIFO files are used for interprocess communication,
inside your computer.
They allow data to be passed from one process
to another in a first in, first out manner.
Alright, oftentimes these are the type of questions
that are asked during the interview.
Now your manager or hiring manager will ask you something
like, tell me the file that starts with Z.
What is the purpose of that file?
Or tell me the identification letter of a device file
and where are they located?
Now remember, I'm not talking about the file name,
I'm talking about the first column
that you see when you run LS minus L command,
which identifies the file type.
Alright, I hope you understand all these different type
of file types in Linux
and how they are identified when you run LS minus L command.
I'll see you in the next lecture.