03 The File System
03 The File System
: PPT/2K403/02
• Files Types.
• File Names.
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
Files Types
3
• Directories
– Are special files containing information about other files, like a catalog.
– In particular,they contain two entries with which the structure of the
hierarchical file system is implemented.
– One of these entries(‘.’) points to the directory itself.
– The other entry (‘..’)points to the entry one level higher in the hierarchy.
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
• Device Files
– Each piece of Hardware in a linux system is represented by device file.
– They represent links between the hardware components or the device
drivers in the kernel and the applications.
• Links
– Links are references to files located at other points in the file system.
– Changes only need to be made to the original file
• Sockets
– Sockets refer to special files with which data exchange between two locally
running processes can be implemented via the file system.
• FIFOs
– FIFO(first in first out) or named pipe is a term used for files to exchange
data between processes.
– However, they can only exchange data in one direction.
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
File Names
5
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
var usr tmp srv sbin root proc opt media lib home etc dev boot bin
share local lib bin x11R6 kde3 floppy cdrom tux geeko sda hda
man doc lib bin share man bin lib bin mail
packages howto
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
• Root Directory /
– The root directory refers to the highest layer of the file system
tree.
– When the system is booted, the partition on which this directory is
located is first one mounted.
– Following directories always have to be on the same partition as
the root directory: /bin ,/dev, /etc, /lib ,&/sbin.
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
• Libraries /lib/
– In this directory /lib , the libraries are located that are used by
programs in the directories /bin and /sbin .
– In addition, the kernel modules are located in the directory
/lib/modules.
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
11
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
– Apache web server are located in the directory /srv/www and the
files of FTP server are located in the directory /srv/ftp.
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
• Group description
– Information is stored here about where exactly other areas are
located(block bitmap , inode bitmap).
• Block bitmap
– Block bitmap stores information which blocks in this group are free or
occupied
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
• Inode bitmap
– It stores the information about how many inodes are free or occupied.
• Inode table
– Information about files are stored.This includes owners, access
permissions, time stamps, and links to data blocks in which data is located.
• Data blocks
– This is where actual data is stored.
– The ext2 file system format can process file names with a length of up to
255 characters.
– The maximum file size can be 2 Tb (with block size of 1024 bytes ) or 16 Tb
(with a block size of 4096 bytes ).
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
– This file system as only one fixed block size of 4096 bytes
– Small files or the ends of the files are stored together in the same
block.
– The inodes required are not generated when the file system is
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02
27