Chapter Two - PowerPoint PPT Presentation

About This Presentation
Title:

Chapter Two

Description:

Chapter Two Exploring the UNIX File System and File Security – PowerPoint PPT presentation

Number of Views:136
Avg rating:3.0/5.0
Slides: 33
Provided by: til70
Learn more at: http://faculty.bucks.edu
Category:

less

Transcript and Presenter's Notes

Title: Chapter Two


1
Chapter Two
  • Exploring the UNIX File System and File Security

2
Lesson A
  • Understanding Files and Directories

3
Objectives
  • Discuss and explain the UNIX file system
  • Define a UNIX file system partition
  • Use the mount command to mount a file system

4
Objectives (cont.)
  • Discuss relative and absolute path addressing
  • Diagram the UNIX file system hierarchy
  • Navigate the file system

5
Understanding the UNIXFile System
  • A file is the basic component for data storage
  • UNIX considers everything it interacts with a
    file
  • A file system is UNIXs way of organizing files
    on mass storage (disk) devices
  • A physical file system is a section of the hard
    disk that has been formatted to hold files
  • The file system is organized in a hierarchical
    structure similar to an inverted tree

6
(No Transcript)
7
Understanding the Standard Tree Structure
  • The structure starts at the root level
  • Root is the name of the file at this basic level
    and it is denoted by the slash character (/)
  • A directory is a file that can contain other
    files and directories
  • A subdirectory is a directory within a directory
  • The subdirectory is considered the child of the
    parent directory

8
Using UNIX Partitions
  • The section of the disk that holds a file system
    is called a partition
  • When installing UNIX, one of the first tasks is
    deciding how to partition a storage device, or
    hard disk
  • Hard disks may have many partitions
  • UNIX partitions are given names
  • LINUX uses hda1 and hda2

9
Using UNIX Partitions
  • Storage devices are called peripheral devices
  • Peripheral devices connect to the computer
    through electronic interfaces
  • IDE - Integrated Drive Electronics
  • SCSI - Small Computer System Interface

10
(No Transcript)
11
Exploring the Root File System
  • UNIX must mount a file system before any programs
    can access files on it
  • To mount a file system is to connect it to the
    directory tree structure
  • The root file system is mounted by the kernel
    when the system starts

12
Exploring the Root File System
  • The root directory contains sub-directories that
    contain files
  • /bin contains binaries, or executables needed to
    start the system and perform system tasks
  • /boot contains files needed by the bootstrap
    loader as well as kernel images
  • /dev contains system device reference files

13
(No Transcript)
14
Exploring the Root File System
  • Root subdirectories continued
  • /etc contains configuration files that the system
    uses when the computer starts
  • /lib contains kernel modules, security
    information, and the shared library images
  • /mnt contains mount points for temporary mounts
    by the system administrator
  • /proc is a virtual file system allocated in
    memory only

15
Exploring the Root File System
  • Root subdirectories continued
  • /root is the home directory of the root user, or
    the system administrator
  • /sbin contains essential network programs used
    only by the system administrator
  • /tmp is a temporary place to store data during
    processing cycles
  • /var contains subdirectories which have sizes
    that often change, such as error logs

16
Using the Mount Command
  • Users can access mounted file systems which they
    have permission to access
  • Additional file systems can be mounted at any
    time using the mount command
  • To ensure system security, only the root user
    uses the mount command

17
Understanding Pathsand Pathnames
  • To specify a file or directory, use its pathname,
    which follows the branches of the file system to
    the desired file
  • A forward slash (/) separates each directory name
  • The UNIX command prompt may indicate your
    location within the file system
  • Use the UNIX pwd command to display the current
    path name

18
(No Transcript)
19
Navigating the File System
  • To navigate the UNIX directory structure, use the
    cd (change directory) command
  • UNIX refers to a path as either
  • Absolute - begins at the root level and lists all
    subdirectories to the destination file
  • Relative - begins at your current working
    directory and proceeds from there

20
Listing Directory Contents
  • The ls (list) command displays a directorys
    contents, including files and subdirectories

21
Listing Directory Contents
  • The system normally uses hidden files to keep
    configuration information and for other purposes

22
Lesson B
  • Working with Files, Directories, and Security

23
Objectives
  • Create new directories to store files
  • Copy files from one directory to another
  • Set file permissions for other user access to
    directory and files

24
Managing Directories and Files
  • mkdir (make directory) command
  • Create a new directory
  • rmdir (make directory) command
  • Delete an empty directory
  • cp (copy) command
  • Copy files from one director to another
  • rm (remove) command
  • Delete files

25
Setting File Permissions
26
Setting File Permissions
File Permissions File Permissions
r Owner has read
w Owner has write
x Owner has execute
r Group has read
- Group does not have write
x Group has execute
r Others have read
- Others do not have write
x Others have execute
27
Setting File Permissionsfor Security
  • chmod command
  • To set file permissions
  • Settings are read (r), write (w), execute (x)
  • The three types of users are owners, groups, and
    others
  • Setting permissions to directories
  • Use the execute (x) to grant access

28
Chapter Summary
  • In UNIX, a file is the basic component for data
    storage and UNIX considers everything a file
  • A file system is the UNIX systems way of
    organizing files on mass storage devices and each
    file is referenced using a correct and unique
    pathname
  • The standard tree structure starts with the root
    (/) directory
  • The section of the mass storage device (or disk)
    that holds a file system is a partition

29
Chapter Summary
  • A path serves as as a map to access any file on
    the system
  • You may customize your command prompt to display
    the current working directory name, the current
    date and time, and several other items
  • The ls command displays the names of files and
    directories contained in a directory
  • Wildcard characters (i.e. , ?) can be used in a
    command such as ls and take the place of other
    characters in a file name

30
Chapter Summary
  • Use the mkdir command to create a new directory,
    as long as you own the parent
  • Use the chmod command to set permissions such as
    read (r), write (w), execute (x) for files that
    you own
  • Use the cp command to copy a source file to a
    destination file and directory

31
(No Transcript)
32
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com