Sunteți pe pagina 1din 16

File Systems

Kedar Ramachandra

Aug 28 , 2019

PES University Hands On Unix Aug 28 , 2019 1 / 15


———-

PES University Hands On Unix Aug 28 , 2019 2 / 15


Everything is a File

Regular Files
Directories
File Listing of Set of Files
Symbolic Links
Files referring to name of another file
Devices and Peripherals

PES University Hands On Unix Aug 28 , 2019 2 / 15


File Name

File Name Features since the beginning of Unix


Case Sensitive
No Obvious Length Limit
Can contain any character (exceptions)
examples
README
.bashrc
index.html.old

PES University Hands On Unix Aug 28 , 2019 3 / 15


Linux FileSystem Structure

/ : Root
/bin/ : Basic Essential System Commands
/boot/ :Kernel Images
/dev/ : Files Representing Devices
/etc/ :System Config Files
/home/ : User Directories
/lib/ : Basic System Shared Libraries

PES University Hands On Unix Aug 28 , 2019 4 / 15


Linux FileSystem Structure

/ lost+found : Corrupt Files


/media : Mount Points for Removable Media
/proc/ :Access to system information
/root/ : Root User Home Directory
/sys/ :System and Device Controls
/tmp/ : Temporary Files

PES University Hands On Unix Aug 28 , 2019 5 / 15


File Paths

Relative Path
Relative to Current Directory
Absolute Path

PES University Hands On Unix Aug 28 , 2019 6 / 15


Command Line Interpreters

Shells : Tools to execute user commands.


They hide the underlying OS
Commands are input in a text terminal , either in a window in a GUI
or textonly console
Results are also displayed on the terminal .
Shells can be scripted.

PES University Hands On Unix Aug 28 , 2019 7 / 15


Well Known Shells

sh The Bourne Shell (Obsolete)


csh The C Shell (Obsolete) : C Like Syntax
tcsh : The TC Shell (popular)
BASH: Bourne Again Shell (most popular)

PES University Hands On Unix Aug 28 , 2019 8 / 15


Special Directories

./
Current Directory
equivalence examples
../
Parent Directory
Typical Usage cd ..

PES University Hands On Unix Aug 28 , 2019 9 / 15


Other Directories

∼/
Shells substitute it with the home directory of the current user.
Cannot be used so often
∼ user2/
Substitutes home directory of user 2

PES University Hands On Unix Aug 28 , 2019 10 / 15


Unix Architecture

PES University Hands On Unix Aug 28 , 2019 11 / 15


Overview of File Subsystem

PES University Hands On Unix Aug 28 , 2019 12 / 15


File System

inode
Contains the description of the disk layout of the file data.
Contains information about the owner, last accessed, access
permissions
Basically means Index Node
inodes are stored in the file system.

PES University Hands On Unix Aug 28 , 2019 13 / 15


File System

File Table
Global Kernel Structure
Keeps track of byte offset in the file where the users next write or
read will start
Keeps track of access rights permitted to opening process
User File Descriptor Table
Allotted per process
identifies all open files for a process.

PES University Hands On Unix Aug 28 , 2019 14 / 15


File System

File System
1 Boot Block
2 Super Block
3 Inode List
4 Data Blocks

PES University Hands On Unix Aug 28 , 2019 15 / 15

S-ar putea să vă placă și