1 © 2001 John Urrutia. All rights reserved. Chapter 4 The LINUX Filesystem.

Slides:



Advertisements
Similar presentations
A Guide to Unix Using Linux Fourth Edition
Advertisements

Pre-Assessment Questions
Agenda The Linux File System (chapter 4 in text) Directory Structures / Navigation Terminology / File Naming Rules Relative vs Absolute pathnames mkdir,
CS 497C – Introduction to UNIX Lecture 11: - The File System Chin-Chih Chang
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.
UNIX file systems Learning Objectives: 1. To understand the basics of file systems 2. To understand the hierarchical structure in Unix file system 3. To.
Introduction to Unix (CA263) File System
Exploring the UNIX File System and File Security
The UNIX File System CS465. File Systems What is a file system? A means of organizing information on the computer. A file system is a logical view, not.
Linux+ Guide to Linux Certification, Second Edition
Chapter 5 Accessing Files and Directories. How Directories Get Created OS installation: usr, dev, etc, export, kernel and others places to store installation.
Linux Linux File System.
The UNIX File System.
Guide To UNIX Using Linux Third Edition
UNIX Files and Security Software Tools. Slide 2 File Systems l What is a file system? A means of organizing information on the computer. A file system.
Basic UNIX © McGraw Hill All rights reserved.
Copyrights© 2008 BVU Amplify DITM DATA BASE MANAGEMENT system Page:1 Lesson 2: The File System By Simi.
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #5  Files and directories in UNIX  Various types of files  File attributes  Notion of pathname  Commands.
Guide To UNIX Using Linux Fourth Edition
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
The file structure and related utilities CS240 Computer Science II.
Manage Directories and Files in Linux
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
Linux Directory Navigation. File & Directory Commands This is a minimal list of Unix commands that you must know for file management: ls (list) mkdir.
1 Lecture 2 Working with Files and Directories COP 3344 Introduction to UNIX.
Unix Basics Chapter 4.
Linux+ Guide to Linux Certification, Second Edition
1Week 4 - Jan 31, 2005 Week 4 Agenda UNIX Directory Structure Absolute pathname Relative pathname Permissions chmod (symbolic/absolute)
The UNIX File System. The UNIX File A file is a container for storing information and data. Filename limited to 255 characters. Can’t contain / or NULL.
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.
1Week 4 - Sep 26, 2005 Week 4 Agenda UNIX Directory Structure Absolute pathname Relative pathname Permissions chmod (symbolic/absolute)
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.
Chapter 4: File Security & Permissions Also: Hard and Soft Links, see p77-80 &
Chapter 4 The File Structure. Contents u The Hierarchical File Structure u Directory and Ordinary Files u Directories u Access Permissions u Links.
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:
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
Λειτουργικά Συστήματα – Lab2 Γιάννης Πετράκης. Directory Navigation and Control  The Unix file system is set up like a tree branching out from the root.
Linux Commands C151 Multi-User Operating Systems.
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.
The Unix File system (UFS) Presented by: Gurpreet Singh Assistant Professor Department of School of Computing and Engineering Galgotias University.
2 Manual & Filestore Mauro Jaskelioff. Introduction Using the manual The UNIX filestore File permissions.
1 Lecture 2 Working with Files and Directories COP 3353 Introduction to UNIX.
Agenda The Linux File System (chapter 4 in text)
BIF713 File and Directory Management. File System A File System is a structure used to organize programs and data on a computer ’ s storage device Files.
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
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
UNIX file systems Learning Objectives: 1. To understand the basics of file systems 2. To understand the hierarchical structure in Unix file system 3. To.
The Unix File System R Bigelow. The UNIX File System The file system refers to the way in which UNIX implements files and directories. The UNIX file system.
Learning basic Unix command It 325 operating system.
ORAFACT The Linux File System. ORAFACT Filesystem Support Support for dozens of filesystem types including: Minix, ext2, MS-DOS, UMSDOS, VFAT, NTFS, NFS,
Agenda The Linux File System (chapter 4 in text) Directory Structures / Navigation Terminology File Naming Rules Relative vs Absolute pathnames Unix Commands:
Linux Filesystem Management
Agenda The Linux File System (chapter 4 in text)
Commands Basic syntax of shell commands UNIX or shell commands have a basic structure command -options target command comes first (such as cd or ls) any.
Linux file system "On a UNIX system, everything is a file;
Chapter 6 File Systems CSNB113 SYSTEM ADMINISTRATION
C151 Multi-User Operating Systems
Exploring the UNIX File System and File Security
Chapter 7 File and file System structure
The Unix File System.
Chapter 4: The Linux Filesystem
January 26th, 2004 Class Meeting 2
Presentation transcript:

1 © 2001 John Urrutia. All rights reserved. Chapter 4 The LINUX Filesystem

2 © 2001 John Urrutia. All rights reserved. Topics The Hierarchical File System Directory and Ordinary Files Working With Directories Access Permissions Links

3 © 2001 John Urrutia. All rights reserved. Hierarchical File Systems  Structured like an upside-down tree  Grandparents at the top  Parents follow  Then Children Topics

4 © 2001 John Urrutia. All rights reserved. Child 1Child 2Child 3 Grandparent Parentauntuncle/Alice/Bobby/Carol/home/tmp/bin Hierarchical Structure / (aka root)

5 © 2001 John Urrutia. All rights reserved. Hierarchical File Systems Directories and ordinary files  Directories / sub-directories  Special files used for grouping  Ordinary Files  Contain the kitchen sink

6 © 2001 John Urrutia. All rights reserved. Directory assistance Directories provide an organized method to access ordinary files.  path –  A series of directory files traveling from the root to the ordinary file.  pathname –  The sequenced listing of directory names from the root to the ordinary file.

7 © 2001 John Urrutia. All rights reserved. Filenames  Max length 255 characters  A thru Z, a thru z, 0 thru 9 _.,  Some file systems limit these to 14 characters  Make them meaningful   IMd12CRU  OOicu812

8 © 2001 John Urrutia. All rights reserved. Filename Extensions Begins with a period  Generally are optional  Used by applications to identify specific file needed by the application  Examples: CPP TXT INI

9 © 2001 John Urrutia. All rights reserved. Invisible Files Must start with a period  Normally not displayed  Used by Unix for special purposes  Use “ ls –a ” to see these 

10 © 2001 John Urrutia. All rights reserved. Topics The Hierarchical File System Directory and Ordinary Files Working With Directories Access Permissions Links

11 © 2001 John Urrutia. All rights reserved. Creating a directory mkdir – utility creates a directory  The argument can either specify an absolute pathname or a relative pathname mkdir mydirectory  In this example “mydirectory” will be created under the current or working directory

12 © 2001 John Urrutia. All rights reserved. Directory file Two invisible files are created for each directory created  One is the pathname of the working directory named “ ”  Two is the pathname of the parent directory named “ ”  cat./Test.file  cat Test.file

13 © 2001 John Urrutia. All rights reserved. Path (to glory or destruction) Every file has a PATHNAME  Absolute Pathnames begin with the root (/)  Each directory in the hierarchy from the root to the file is separated by a slash

14 © 2001 John Urrutia. All rights reserved. Test.file Path example: /Alice/Bobby/Carol /home/tmp/bin // /home /Bobby Test.file /home/Bobby/Test.file

15 © 2001 John Urrutia. All rights reserved. Absolute & Relative Path Absolute path is fully qualified  cat /home/Bobby/Test.file Relative path is based on the working directory  pwd – Print Working Directory  /home/Bobby  cat Test.file

16 © 2001 John Urrutia. All rights reserved. The Working Directory You’re working directory is assigned by the login process. To access files in working directory simply refer to the filename no path is needed. Files outside your working directory require a pathname.

17 © 2001 John Urrutia. All rights reserved. Your Working Directory Generally you’re working directory will be  /home/userid

18 © 2001 John Urrutia. All rights reserved. Important Directories and Files The root - / (of all evil)  /root – Home directory for root  /boot – static files of the boot loader  /bin – files needed to boot the system  /sbin – /usr/sbin system admin. utilities  /dev – device files  /etc – admin. and configuration files

19 © 2001 John Urrutia. All rights reserved. Important Directories and Files  /tmp– temporary files  /home – user home directories  /lib – shared libraries  /mnt – mount point of temporary partitions  /tmp – temporary files  /usr – 2 nd major hierarchy – rarely change  /proc – kernel and process information

20 © 2001 John Urrutia. All rights reserved. Changing working directory pwd – displays your working directory cd - change directory  By default places you in your working directory (ie /home/userid)  cd ~ (will do the same thing) cd path/path1 – changes relative to your working directory

21 © 2001 John Urrutia. All rights reserved. Access Permissions Every file has access “permissions” associated with them.  r – read  w – write  x – execute

22 © 2001 John Urrutia. All rights reserved. Access Permissions Every ordinary file has three access groups.  Owner or User  User who created the file  Group  Users who are associated  Others  The rest of the world

23 © 2001 John Urrutia. All rights reserved. Access Permissions Directory file access “permissions”  r – read the directory  w – write the directory  x – search the directory

24 © 2001 John Urrutia. All rights reserved. Access Permissions Setting default “permissions”  umask 000  One digit each for U,G,O  Octal value representing the 3 bits RWXRWXRWX

25 © 2001 John Urrutia. All rights reserved. Directory Utilities chmod – change access mode u – User or owner g – group o – others + – add permission - – remove permission

26 © 2001 John Urrutia. All rights reserved. Directory Utilities mkdir – Make Directory  mkdir –p directory-list  The –p option creates the parent directory if it doesn’t exist  directory-list  One or more directories separated by space

27 © 2001 John Urrutia. All rights reserved. Directory Utilities rmdir – remove Directory  rmdir directory-list  directory-list  One or more directories separated by space

28 © 2001 John Urrutia. All rights reserved. Directory Utilities rm – remove  rm –r directory-list  The –r option removes recursively. All subdirectories are removed  directory-list  One or more directories separated by space

29 © 2001 John Urrutia. All rights reserved. Directory Utilities cd – change directory  cd directory  The directory (pathname) becomes the working directory

30 © 2001 John Urrutia. All rights reserved. Links aka – Also Known As  Creates an entry in the directory that point to an existing file or directory.  Doesn’t create a copy of the file

31 © 2001 John Urrutia. All rights reserved. Links – Hard and Symbolic Hard links  Behave just like a file  Cannot distinguish the original filename from the link  Cannot cross file systems  Directory links by superuser only

32 © 2001 John Urrutia. All rights reserved. Links – Hard and Symbolic Symbolic links  Indirect pointer to file or directory  Can be created by anyone  Can reside anywhere  Can become an orphan

33 © 2001 John Urrutia. All rights reserved. Link Utility ln – Make a link entry  ln [–s] filename linkname  ln [–s] file-list directory