Download presentation
Presentation is loading. Please wait.
Published byFrancine Wilcox Modified over 6 years ago
1
Chapter 6 File Systems CSNB113 SYSTEM ADMINISTRATION
College of Information Technology Universiti Tenaga Nasional (UNITEN) SN 2017
2
Objectives Understand the initial categorization of files into ordinary, directory and device Learn the hierarchical structure of file system Become aware of the significance of absolute and relative pathnames Understand the four components of file systems Mount and unmount file systems with mount and unmount SN 2017
3
File Container for storing information There types: Ordinary file
Directory file Device file SN 2017
4
Ordinary File The most common file type containing a stream of data
Two types: Text file Contains only printable characters Binary file Contains both printable and non-printable characters (cover entire ASCII range) SN 2017
5
Directory File Contains no data, but maintains some details of the files and subdirectories that it contains Each entry has 2 components; Filename Unique identification number for the file or directory – inode number User cannot write directly to the directory file – perform some actions that make the kernel write a directory SN 2017
6
Device File A file that is representing a device that allows the user to perform reading or writing activities from or to the device Kernel identifies a device from its attributes and then uses them to operate the device. SN 2017
7
File System File system is a logical collection of files on a partition or disk. A partition is a container for information and can span an entire hard drive if desired File system is organized in the form of a directory structure with its own root Hard drive can have various partitions which usually contain only one file system, such as one file system housing the /file system or another containing the /home file system One file system per partition allows for the logical maintenance and management of differing file systems. Should be kept separately from data files created by users SN 2017
8
File System - Unix Unix uses a hierarchical file system structure, much like an upside-down tree, with root (/) at the base of the file system and all other directories spreading from there. The directories have specific purposes and generally hold the same types of information for easily locating files. SN 2017
9
Partitioning Advantage of partitioning:
Prevent potential violation conflicts between various data areas Corruption in one area will not affect the others Perform backup separately SN 2017
10
Hierarchy Second Group of File Systems First Group of File Systems /
bin etc lib dev dsk fd0 lp0 home sn010101 sw123456 tmp usr sbin local var Second Group of File Systems First Group of File Systems SN 2017
11
/ (root) Root file system Swap file system
This is the root directory which should contain only the directories needed at the top level of the file structure Contains the bare-bones UNIX Swap file system Temporary location for processes when memory is heavily loaded – loaded back to memory when swapped processes are ready to run SN 2017
12
Hierarchy root directory
top of the hierarchy Represented by a / (front slash) Parent is always a directory. An ordinary or device file CANNOT be the parent of another file Modern UNIX systems – set up with multiple systems – meet specific purpose SN 2017
13
UNIX File System First group – made available during system installation Directories Description /bin and /usr/bin Store commonly used UNIX commands /sbin and /usr/bin Store most of the commands that can only be executed by system administrator /etc Configuration files of the system. E.g. /etc/passwd and /etc/shadow /dev Contains all device files /lib and /usr/lib Contains all library files in binary form /usr/include Contains standard header files used by C programs /usr/share/man Store manual pages SN 2017
14
UNIX File System Second group – files created by the user Directories
Description /tmp Allowed to create temporary files – wiped regularly by the system /var Part of the file system – print job, incoming or outgoing mail /home User’s personal directory SN 2017
15
Components of File System
Description Boot block Contains a small boot program and the partition table – referred as Master Boot Record (MBR). Boot program – responsible for the eventual loading of kernel into memory Superblock Contains global information about the file system. Update disk copy with memory copy inode blocks inode (file attributes) for every file of the file system. Keep track of every disk block used by a file data blocks All data and program created by users SN 2017
16
Absolute Pathnames Using root (/) as the ultimate reference point
Example: /home/sn010101/dir01/file1.txt Example of using absolute path name with command: $ cat /home/sn010101/fileb.txt SN 2017
17
Relative Pathnames Pathnames that begin with either of these symbols;
. (a single dot) Represents CURRENT directory .. (two dots) Represents PARENT directory Example: $ cd .. SN 2017
18
Mounting A process where all secondary file systems mount (attach) themselves to the root file system A file system must be mounted in order to be usable by the system. To see what is currently mounted (available for use) on your system, use the following command − The /mnt directory, by the Unix convention, is where temporary mounts (such as CDROM drives, remote network drives, and floppy drives) are located. $ mount SN 2017
19
Mounting Use the mount command with the following syntax Example:
This assumes that your CD-ROM device is called /dev/cdrom and that you want to mount it to /mnt/cdrom. $ mount -t file_system_type device_to_mount directory_to_mount_to $ mount -t iso9660 /dev/cdrom /mnt/cdrom SN 2017
20
Unmounting A process of unmounting the mounted secondary file systems
To unmount (remove) the file system from your system, use the umount command by identifying the mount point or device. Example: Mount by device name as the argument The mount command enables you to access your file systems, but on most modern Unix systems, the automount function makes this process invisible to the user and requires no intervention. $ umount /dev/cdrom SN 2017
21
References Das, S. (2012). Your UNIX/LINUX The Ultimate Guide: Third Edition. McGraw-Hill Hahn, H. (2008). Harley Hahn's Guide to Unix and Linux. California: McGraw-Hill Higher Education SN 2017
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.