Original 1436864322 File System v1.1
Original 1436864322 File System v1.1
July 2015
Confidentiality Statement
We, in our dealings, are self-regulated by a Code of Conduct as enshrined in the Tata Code
of Conduct. We request your support in helping us adhere to the Code in letter and spirit. We
request that any violation or potential violation of the Code by any person be promptly
brought to the notice of the Local Ethics Counselor or the Principal Ethics Counselor or the
CEO of TCS. All communication received in this regard will be treated and kept as
confidential.
Table of Content
1.1 Objective
A file is nothing but a structure that stores data on any system. All files are stored
on the hard disk of the system. A file can contain any type of data such as an
mage, documents, programs etc. Each file is identified by a filename which can
be up to 255 characters long.
TCS Internal
o This type of file is used to represent a real physical device such as
a printer, tape drive or terminal.
o Unix considers any device attached to the system to be a file - in-
cluding your terminal.
o Two types of I/O devices - character and block
o Found only under directories named /dev
Apart from these three categories, unix considers a fourth category of file
, the pipe
Pipes
o UNIX allows users to link commands together using a pipe. The
pipe acts a temporary file which only exists to hold data from one
command until it is read by another
The location of a file in the file system is called its path. Paths can be either
Absolute or relative.
Absolute Path:
Relative Path:
Relative path is defined as path related to the present working directory (pwd).
TCS Internal
/bin – Holds many of the basic Linux programs/commands; bin stands for
binaries, files that are executable.
/dev – Holds device files. All info sent to /dev/null is thrown into trash. Your
terminal is one of the /dev/tty files.
/etc – It and its subdirectories hold many of Linux config files.
TCS Internal
partition is a standalone file system. A disk partitions is a contiguous
area of a hard disk that has been divided into several logical disks.
Every File system is organized into a sequence of blocks (e.g. 1024 bytes
each) with the following components:
Boot block: The boot block contains the initial bootstrap program
used to load the operating system(kernal) . Located in the first few
sectors of a file system.
Super block: This block contains global file system information and
is considered as the balance sheet of a UNIX file system. Sometimes
multiple copies are maintained.
The Superblock contains:
• File system size
• Length of the file system’s logical block.
• Number of free data blocks and a partial list of blocks
immediately available.
• Number of free inodes and a partial list of immediately useable
inodes.
TCS Internal
2. file type (e.g., regular, directory, special device, pipes, etc.)
7. size of the file in bytes (for regular files), major and minor
device numbers for special devices.
TCS Internal
1.6 Video Links: Unix File System
https://www.youtube.com/watch?v=fpxcL7tm2qM
https://www.youtube.com/watch?v=ymYZPtrvgec
https://www.youtube.com/watch?v=hZpom8ouYD8
TCS Internal