File System and Directory Structure in Linux. What is File System In a computer, a file system is the way in which files are named and where they are.

Slides:



Advertisements
Similar presentations
Va-scanCopyright 2002, Marchany Unit 8 – Solaris File Systems Randy Marchany VA Tech Computing Center.
Advertisements

POS/420 Philip Robbins – March 19, 2013 (Week 2) University of Phoenix Mililani Campus Introduction to Unix.
The UNIX File System Harry Chen Department of CSEE University of MD Baltimore County.
Basic Unix system administration
Linux Booting Procedure
Linux can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
A Guide to Unix Using Linux Fourth Edition
CS 497C – Introduction to UNIX Lecture 11: - The File System Chin-Chih Chang
The Unix File System. What are the three parts of every file on a Unix filesystem? And where is each stored? Filename - stored in directories Inode -
5 Basic utilities When a user logs in to the Linux operating system the directory that they will start in is their home directory. Most users will have.
1 Unix Systems Administration Y. K. Chang Generic Unix Directory Structure /bin /dev /etc /sbin /home /lost+found / Root Dir /dsk /rdsk /term /pts /rmt.
Introduction to Unix (CA263) File System
Exploring the UNIX File System and File Security
Linux Intro Linux, the do it yourself OS Linux, successor to MINIX Linux, Unix for the masses (PC users) History:
GNU/Linux Filesystem 1 st AUT GNU/Linux Festival Computer Engineering & IT Department Bahador Bakhshi.
Linux Linux File System.
The UNIX File System.
Guide To UNIX Using Linux Third Edition
Linux Files and Directories. Linux directories Linux system are arranged in what is called a hierarchical directory structure. This means that they are.
Chapter 10 File System Interface
Guide To UNIX Using Linux Fourth Edition
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
Manage Directories and Files in Linux
Linux Filesystem Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Unix Basics Chapter 4.
Chapter Two Exploring the UNIX File System and File Security.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Linux Introduction What is Linux? How do you use it?
USING YOUR INSTALLED LINUX SYSTEM.  Common Linux Tasks  Installing Custom Packages  Common GUI Applications  Command Line Shell  Directory Structure/Navigation.
Linux file system "On a UNIX system, everything is a file; if something is not a file, it is a process." Sorts of files (on a Linux system) Directories:
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Chapter Two Exploring the UNIX File System and File Security.
UNIX/LINUX OPERATING SYSTEM. Introduction to Linux Introduction to Unix History of UNIX What is Linux Linux Distributions Linux Installation Unix File.
E X C E E D I N G E X P E C T A T I O N S Basic LINUX Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Directory structure:
Review Please hand in any homework and practicals Vim Scripting Inter-device communication.
1 © 2001 John Urrutia. All rights reserved. Chapter 4 The LINUX Filesystem.
System Administration – Part 2. Devices in UNIX are files: A device can be accessed with different file names All device files are stored in /dev or its.
Linux Commands C151 Multi-User Operating Systems.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
Slide: 1 UNIX FILE SYSTEM By:Qing Yang ID: Operating System Research Topic December, 2000.
Linux Filesystem WeeSan Lee. Roadmap Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 File-System Interface.
The Unix File system (UFS) Presented by: Gurpreet Singh Assistant Professor Department of School of Computing and Engineering Galgotias University.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
UNIX File System By Vishal Desai. Introduction Basic purpose of file system: Represent and organize the system resources. But UNIX File System also maps.
SUSE Linux Enterprise Desktop Administration Chapter 7 Manage Directories and Files.
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
Operating System & Administration UNIT-III Introduction to File System.
Date: 14-Oct-2014 LINUX and Vi Editor Vinit S Bhosle
LINUX Zhengli Zhu, School of Life Sciences. Outline 1. ABC of Linux 2. Basic orers of Linux 3. Bash Programming.
ORAFACT The Linux File System. ORAFACT Filesystem Support Support for dozens of filesystem types including: Minix, ext2, MS-DOS, UMSDOS, VFAT, NTFS, NFS,
Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree.
BILKENT UNIVERSITY DEPARTMENT OF COMPUTER TECHNOLOGY AND INFORMATION SYSTEMS CTIS156 INFORMATION TECHNOLOGIES II FILES AND FILE SYSTEM STRUCTURE.
Filesystem Hierarchy Operating systems I800
Welcome to Linux Chap#1 Hanin Abdulrahman.
UBUNTU INSTALLATION
Linux file system "On a UNIX system, everything is a file;
Linux/Unix - Download Ubuntu Linux :
Chapter 6 File Systems CSNB113 SYSTEM ADMINISTRATION
Basic Commands ls cp ls –l (in detail format) echo ls –a
C151 Multi-User Operating Systems
9 Linux on the Desktop.
Exploring the UNIX File System and File Security
Operating Systems Lecture 4.
Perl Scripting and The File system
Welcome to Linux Chap#1 Hanin Abdulrahman.
Welcome to Linux Chap#1.
Chapter 4: The Linux Filesystem
January 26th, 2004 Class Meeting 2
Presentation transcript:

File System and Directory Structure in Linux

What is File System In a computer, a file system is the way in which files are named and where they are placed logically for storage and retrieval. Sometimes the term refers to the part of an operating system or an added-on program that supports a file system. Examples of such add-on file systems include the Network File System (NFS).

logical file structure physical representation on disk

File System File systems specify conventions for naming files. These conventions include the maximum number of characters in a name, which characters can be used, and, in some systems, how long the file name suffix can be. A file system also includes a format for specifying the path to a file through the structure of directories.

Linux File System Ext2: This is like UNIX file system. Ext3: It is ext2 filesystem with enhancement. Isofs (iso9660): Used by CDROM file system. Sysfs: It is a ram-based filesystem initially based on ramfs. It is use to exporting kernel objects so that end user can use it easily. Procfs: The proc file system acts as an interface to internal data structures in the kernel For example you can find out cpuinfo with following command:

Inside File System User Data Meta Data

Linux Directory Structure The Directory Structure in Unix & Linux are a unified Directory Structure where in all the directories are unified under the "/" Root file system. Irrespective of where the File System is physically mounted all the directories are arranged hierarchically under the Root file system.

1. / – Root Every single file and directory starts from the root directory. Only root user has write privilege under this directory.

2. /bin – User Binaries Contains binary executables. Common linux commands you need to use in single-user modes are located under this directory. For example: ps, ls, ping, grep, cp.

3. /sbin – System Binaries Just like /bin, /sbin also contains binary executables. But, the linux commands located under this directory are used typically by system administrator, for system maintenance purpose. For example: iptables, reboot, fdisk, ifconfig,

4. /etc – Configuration Files Contains configuration files required by all programs. This also contains startup and shutdown shell scripts used to start/stop individual programs. For example: /etc/resolv.conf, /etc/logrotate.conf

5. /dev – Device Files Contains device files. These include terminal devices, usb, or any device attached to the system. For example: /dev/tty1, /dev/usbmon0

6. /proc – Process Information Contains information about system process. This filesystem contains information about running process. For example: /proc/{pid} directory contains information about the process with that particular pid. This is a virtual filesystem with text information about system resources. For example: /proc/uptime

7. /var – Variable Files var stands for variable files. Content of the files that are expected to grow can be found under this directory. This includes — system log files (/var/log); packages and database files (/var/lib); s (/var/mail); print queues (/var/spool); lock files (/var/lock); temp files needed across reboots (/var/tmp);

8. /tmp – Temporary Files Directory that contains temporary files created by system and users. Files under this directory are deleted when system is rebooted.

9. /usr – User Programs Home directories for all users to store their personal files. For example: /home/john

11. /boot – Boot Loader Files Contains boot loader related files. Grub files are located under /boot For example: initrd.img generic, vmlinuz generic

12. /lib – System Libraries Contains library files that supports the binaries located under /bin and /sbin Library filenames are either ld* or lib*.so.* For example: ld so, libncurses.so.5.7

13. /opt – Optional add-on Applications opt stands for optional. Contains add-on applications from individual vendors. add-on applications should be installed under either /opt/ or /opt/ sub-directory.

14. /mnt – Mount Directory Temporary mount directory where sysadmins can mount filesystems.

Inode The inode (index node) is a fundamental concept in the Linux and UNIX file system. Each object in the file system is represented by an inode.

File Information File type (executable, block special etc) => Permissions (read, write etc) => Owner => Group => File Size => File access, change and modification time (remember UNIX or Linux never stores file creation time, this is favorite question asked in UNIX/Linux sys admin job interview) => File deletion time => => Access Control List (ACLs)

Inode All the above information stored in an inode. In short the inode identifies the file and its attributes (as above). Each inode is identified by a unique inode number within the file system. Inode is also know as index number.