0% found this document useful (0 votes)
14 views

file types in unix

The document outlines the various types of files in the Unix operating system, including ordinary files, directories, special files, pipes, sockets, and symbolic links. Each file type serves a specific purpose, such as storing data, facilitating inter-process communication, or providing shortcuts to other files. The document also explains how to create and identify pipes and symbolic links using specific symbols in the long-format output of the 'ls -l' command.

Uploaded by

mariashahzadi257
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

file types in unix

The document outlines the various types of files in the Unix operating system, including ordinary files, directories, special files, pipes, sockets, and symbolic links. Each file type serves a specific purpose, such as storing data, facilitating inter-process communication, or providing shortcuts to other files. The document also explains how to create and identify pipes and symbolic links using specific symbols in the long-format output of the 'ls -l' command.

Uploaded by

mariashahzadi257
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Types of Files in Unix

In Unix operating system, all data is organized into files. Each file is organized into directories, and
these directories are organized in a tree-like structure called a file system.
The following are the types of files in Unix:
1. Ordinary Files
2. Directories
3. Special Files
4. Pipes
5. Sockets
6. Symbolic Links
Ordinary Files:
an ordinary file is a file on the system that contains data, text, or program instructions. In this tutorial,
you look at working with ordinary files.
Directories files:
Directories store both special and ordinary files. For users familiar with Windows or Mac OS, UNIX
directories are equivalent to folders.
Special Files:
some special files provide access to hardware such as hard drives, CDROM drives, modems, and
Ethernet adapters. Other special files are similar to aliases or shortcuts and enable you to access a
single file using different names.
Pipes File:
In Unix, with the help of pipes, we can link command together. Pipes is like a temporary file that only
exists to hold the data from one command till it is read by another. A one-way flow of data is provided
by the Unix pipe. The first command's output sequence is used like an input to the next command
sequence. In order to create a pipe, the vertical bar (|) has to be placed on the command line between
2 commands. Such as who | wc -l
In the long-format output of ls -l, known as pipes, are marked using the symbol "p."
Socket file:
Unix sockets are a type of file that enables for advanced inter-process communication. It is also known
as inter-process communication socket. In the framework of the client-server application, a Unix Socket
is used. It is essentially a data stream, same as the network stream and network socket, except each
transaction is local to the file system.
In the long-format output of ls -l, using the "s" symbol, Unix sockets are marked.
Symbolic File:
The symbolic link is used to reference another file in the file system. In order to reference another file
of the file system, we use the symbolic link. It involves a text representation of the path to the file it
refers to. To an end-user, a symbolic link will seem to have its own name, yet when we need writing or
reading data to this file, it will rather reference these tasks to the file it focuses to. When we delete the
soft link itself, then the data file would, in any case, be there. The symbolic file will not function if the
source file is deleted or moved to the different location.
In the case of the long-format output of ls -l, using the "l" symbol, the symbolic link is marked.

You might also like