Académique Documents
Professionnel Documents
Culture Documents
Class Meeting 3
Slide : 1
Todays Agenda
File system Hierarchy Standard
Linux File System
Comparison of MS-DOS & Linux.
DOS to Linux Cheat Sheet.
File Systems
File System Types
Device Driver Names
Partitioning
The mount command
The UNIX File System Design
Filesystem Hierarchy Standards & filesystem Structure
Class Meeting 3
Slide : 2
Linux
Slide : 3
Linux
Class Meeting 3
Slide : 4
Class Meeting 3
Slide : 5
Class Meeting 3
Slide : 6
File Systems
The file system is a combination of the partitions
and directories that make up your Linux system.
Class Meeting 3
Slide : 7
Class Meeting 3
Slide : 8
Devicedriver
driver
Device
/dev/hda
/dev/hda
/dev/hdb
/dev/hdb
/dev/hdc
/dev/hdc
/dev/hdd
/dev/hdd
Drive
Drive
MasterIDE
IDEdrive,
drive,primary
primaryIDE
IDEbus.
bus.
Master
SlaveIDE
IDEdrive,
drive,primary
primaryIDE
IDEbus.
bus.
Slave
MasterIDE
IDEdrive,
drive,secondary
secondaryIDE
IDEbus.
bus.
Master
SlaveIDE
IDEdrive,
drive,secondary
secondaryIDE
IDEbus.
bus.
Slave
/dev/sda
/dev/sda
/dev/sdb
/dev/sdb
/dev/st0
/dev/st0
/dev/scd0
/dev/scd0
FirstSCSI
SCSIhard
harddrive.
drive.
First
SecondSCSI
SCSIhard
harddrive.
drive.
Second
FirstSCSI
SCSItape
tapedrive.
drive.
First
FirstSCSI
SCSICD-ROM
CD-ROMdrive.
drive.
First
Class Meeting 3
Linux
Slide : 9
Partitioning
For a large hard disk, it's better to split it into
several partitions (fdisk command):
The root partition
/dev/hda1
/dev/hda1
where / resides.
/dev/hda5
/dev/hda5
Contains all the things necessary
/dev/sda2
/dev/sda2
to start the system, (50MB to 100MB)
The swap partition
Used to support virtual memory.
The minimum size is equal to the size of RAM
(or 16MB), while the maximum size is roughly 2
x Physical memory.
Linux can support more than one swap partition
and swap file.
Filesystem Hierarchy Standards & filesystem Structure
Class Meeting 3
Slide : 10
Mount Points
Class Meeting 3
Slide : 11
Understanding mounts
Mount points are directories where one may mount a
second disk partition to a first to make the second appear
as part of the first.
That is, the tree receives a "graft," another branch, at that
point, and the tree thus becomes that much larger.
In fact, this is the only way to add to the existing file
system's Volume, by adding another partition to it.
Class Meeting 3
Slide : 12
Understanding mounts
Class Meeting 3
Slide : 13
Class Meeting 3
Slide : 14
Class Meeting 3
Slide : 15
Class Meeting 3
Slide : 16
Linux uses the second extended (ext2 & etx3) file system
University of Lahore
zahidshafiq@linuxmail.org
Class Meeting 3
17
Slide : 17
Class Meeting 3
Slide : 18
Class Meeting 3
Slide : 19
Class Meeting 3
Slide : 20
Class Meeting 3
Slide : 21
Class Meeting 3
Slide : 22
Class Meeting 3
Slide : 23
Class Meeting 3
Slide : 24
Device
Console
cua*
fd*
hd*
lp*
md*
null
ramdisk
sd*
sr*
st*
tpqic*,ntpqic*
rft*,nrft*
tty
ttys*
vc*
zero
System console
Deprecatedoriginally referred to a serial port
Floppy drive
IDE hard disk or CD-ROM
Parallel port
RAID array
Null output device
RAM disk
SCSI hard disk
SCSI CD-ROM
SCSI tape
QIC tape
Terminal or pseudoterminal
Serial port
Contents of a tty device, such as a virtual console
Alt binary Os input device tty Serial port Contents of a tty
Class Meeting 3
Slide : 25
Class Meeting 3
Slide : 26
Class Meeting 3
Slide : 27
Class Meeting 3
Slide : 28
This is where the basic libraries for booting Linux and running
standard programs reside.
Do not delete anything in this directory, ever
Class Meeting 3
Slide : 29
Class Meeting 3
Slide : 30
Class Meeting 3
Slide : 31
Files in /bin
arch
ash
ash.static
awk
basename
bash
bash2
bsh
cat
chgrp
chmod
chown
consolechars
cp
df
dmesg
dnsdomainname
doexec
domainname
echo
ed
egrep
ex
false
fgrep
fsconf
gawk
gawk-3.0.3
igawk
ipcalc
kill
ksh
linuxconf
In
loadkeys
login
ls
mail
mkdir
mknod
mktemp
more
netstat
nice
nisdomainname
ping
PS
pwd
red
remadmin
rm
rmdir
rpm
rvi
rview
sed
sort
stty
su
sync
tar
tcsh
touch
true
umount
uname
userconf
usleep
vi
evie
Class Meeting 3
Slide : 32
Class Meeting 3
Slide : 33
Class Meeting 3
Slide : 34
This is where your log files, and printer files are kept.
Class Meeting 3
Slide : 35
Class Meeting 3
Slide : 36
This is the location where you mount your cdrom, zip drives,
or dos drives.
Class Meeting 3
Slide : 37
Class Meeting 3
Slide : 38
Class Meeting 3
Slide : 39
Class Meeting 3
Slide : 40
When you recover a file system, files and file data may be
partially recovered. For example, the recovery utility may
recover a file's data but not the file's name. Such files are
placed by the utility in the/lost+found subdirectory of the
root directory of the file system.
Class Meeting 3
Slide : 41
/usr for standard programs that are shareable across a whole site;
/home for home directories of users;
/var for spool directories, log files, accounting, etc.;
/tmp for temporary files;
/proc stores images of all running process
Class Meeting 3
Slide : 42
Class Meeting 3
Slide : 43
Class Meeting 3
Slide : 44
Class Meeting 3
Slide : 45
Class Meeting 3
Slide : 46
Directories
Directories are structured in a hierarchical tree. Each directory
can contain files and subdirectories. Directories are
implemented as a special type of files.
Actually, a directory is a file containing a list of entries. Each
entry contains an inode number and a file name.
Class Meeting 3
Slide : 47
.
..
bin
dev
lib
etc
home
tmp
6
Size
time
132
home directory
in block 132
6
.
1
..
19
user1
30
john
51
pat
26
peter
pat directory
in block 406
51
Size
time
406
.
..
notes
cgi
ch1.txt
doc
81
Size
time
512
646
379
427
i-node
number
(2 bytes)
University of Lahore
51
6
64
92
81
17
i-node
zahidshafiq@linuxmail.org
Class Meeting 3
48
Slide : 48
Exercise:
Class Meeting 3
Slide : 49
Homework
Homework this week:
Next week:
Class Meeting 3
Slide : 50