Linux Files Types
In Linux everything is a file, and there are basically three types of files:
- Ordinary/Regular files
- Special files
- Directories
Ordinary/Regular Files
These are files data contain text, data or program instructions and they are the most common type of files you can expect to find on a Linux system :
- Readable files
- Binary files
- Image files
- Compressed files and so on.
You can see the file type with the command ls -l
At the bottom of this article, you will understand what these acronyms ( -rw-r--r-- and drwxr-xr-x) represent, but we need to remember the file permission as well that we saw in another article.
Special Files
Special files include the following:
- Block files : These are device files that provide buffered access to system hardware components. They provide a method of communication with device drivers through the file system.
One important aspect about block files is that they can transfer a large block of data and information at a given time.
- Character files : These are also device files that provide unbuffered serial access to system hardware components. They work by providing a way of communication with devices by transferring data one character at a time.
- Symbolic link files : A symbolic link is a reference to another file on the system. Therefore, symbolic link files are files that point to other files, and they can either be directories or regular files.
- Pipes or Named pipes : These are files that allow inter-process communication by connecting the output of one process to the input of another.
- Socket files : These are files that provide a means of inter-process communication, but they can transfer data and information between process running on different environments.
This means that sockets provide data and information transfer between process running on different machines on a network.
Directories
These are special files that store both ordinary and other special files and they are organized on the Linux file system in a hierarchy starting from the root
(/)
directory.
You should now be having a clear understanding of why everything in Linux is a file and the different types of files that can exit on your Linux system.
You can add more to this by reading more about the individual file types and they are created.
So just to summarize:
Thanks in advance! 😃
Linux Files Types
Reviewed by ohhhvictor
on
November 04, 2018
Rating:
No comments: