Guide to unix using linux third edition
This presentation is the property of its rightful owner.
Sponsored Links
1 / 31

Guide To UNIX Using Linux Third Edition PowerPoint PPT Presentation


  • 141 Views
  • Uploaded on
  • Presentation posted in: General

Guide To UNIX Using Linux Third Edition. Chapter 2: Exploring the UNIX/Linux File Systems and File Security. Objectives. Discuss UNIX/Linux file systems Explain partitions and inodes Understand the elements of the root hierarchy Use the mount command

Download Presentation

Guide To UNIX Using Linux Third Edition

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Guide to unix using linux third edition

Guide To UNIX Using LinuxThird Edition

Chapter 2:

Exploring the UNIX/Linux File Systems and File Security


Objectives

Objectives

  • Discuss UNIX/Linux file systems

  • Explain partitions and inodes

  • Understand the elements of the root hierarchy

  • Use the mount command

  • Explain and use paths, pathnames, and prompts

Guide to UNIX Using Linux, Third Edition


Objectives continued

Objectives (continued)

  • Navigate the file system

  • Create and remove directories

  • Copy and delete files

  • Configure file permissions

Guide to UNIX Using Linux, Third Edition


Understanding unix linux file systems

Understanding UNIX/LinuxFile Systems

  • File: basic component for data storage

    • UNIX/Linux considers everything to be a file

  • A file system is UNIX/Linux’s way of organizing files on mass storage 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 (inverted tree)

Guide to UNIX Using Linux, Third Edition


Guide to unix using linux third edition

Understanding UNIX/LinuxFile Systems (continued)

Guide to UNIX Using Linux, Third Edition


Understanding the standard tree structure

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 (/)

  • Directory: file that can contain other files and directories

  • Subdirectory: directory within a directory

    • The subdirectory is considered the child of the parent directory

Guide to UNIX Using Linux, Third Edition


Using unix linux partitions

Using UNIX/Linux Partitions

  • The section of the disk that holds a file system is called a partition

    • When installing UNIX/Linux, one of the first tasks is deciding how to partition a storage device, or hard disk

    • Hard disks may have many partitions

  • UNIX/Linux partitions are given names

    • LINUX uses hda1 and hda2

Guide to UNIX Using Linux, Third Edition


Using unix linux partitions continued

Using UNIX/Linux Partitions (continued)

  • Storage devices are called peripheral devices

  • Peripheral devices connect to the computer through electronic interfaces

    • IDE: Integrated Drive Electronics

    • SCSI: Small Computer System Interface

Guide to UNIX Using Linux, Third Edition


Guide to unix using linux third edition

Guide to UNIX Using Linux, Third Edition


Setting up hard disk partitions

Setting Up Hard Disk Partitions

  • Partitioning your hard disk provides organized space for file systems

  • At least 3 partitions (root, swap, /boot) often recommended

  • Root partition holds root file system directory (/), size depends on installation but often ranges between 1.2 to 5+ GB

Guide to UNIX Using Linux, Third Edition


Setting up hard disk partitions continued

Setting Up Hard Disk Partitions (continued)

  • Swap partition acts as a memory extension, often has same size as RAM, enables virtual memory

  • /boot partition used to store os files comprising kernel, relatively small

  • Other often used partitions include /usr, /home, /var

Guide to UNIX Using Linux, Third Edition


Using inodes

Using Inodes

  • Inodes are associated with directories and files in ufs and ext file systems

  • An inode contains the name, general information, and location information (a pointer) for a file or directory

  • A superblock contains information about about block layout on a specific partition

Guide to UNIX Using Linux, Third Edition


Exploring the root hierarchy

Exploring the Root Hierarchy

  • UNIX/Linux 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

Guide to UNIX Using Linux, Third Edition


Exploring the root hierarchy continued

Exploring the Root Hierarchy (continued)

  • 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

Guide to UNIX Using Linux, Third Edition


Guide to unix using linux third edition

Guide to UNIX Using Linux, Third Edition


Exploring the root file hierarchy continued

Exploring the Root File Hierarchy (continued)

  • 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

Guide to UNIX Using Linux, Third Edition


Exploring the root file hierarchy continued1

Exploring the Root File Hierarchy (continued)

  • 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

Guide to UNIX Using Linux, Third Edition


Using the mount command

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

Guide to UNIX Using Linux, Third Edition


Using paths pathnames and prompts

Using Paths, Pathnames, and Prompts

  • 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/Linux command prompt may indicate your location within the file system

    • Use the UNIX/Linux pwd command to display the current path name

Guide to UNIX Using Linux, Third Edition


Guide to unix using linux third edition

Guide to UNIX Using Linux, Third Edition


Guide to unix using linux third edition

Guide to UNIX Using Linux, Third Edition


Navigating the file system

Navigating the File System

  • To navigate the UNIX/Linux directory structure, use the cd (change directory) command

  • UNIX/Linux 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

Guide to UNIX Using Linux, Third Edition


Using dot and dot dot addressing techniques

Using Dot and Dot Dot Addressing Techniques

  • UNIX/Linux interpret a single dot (.) to mean the current working directory

  • Two dots (..) mean the parent directory

  • cd .. moves you up a level in the directory structure

Guide to UNIX Using Linux, Third Edition


Listing directory contents

Listing Directory Contents

The ls (list) command displays a directory’s contents, including files and subdirectories

Guide to UNIX Using Linux, Third Edition


Using wildcards

Using Wildcards

  • A wildcard is a special character that is used as a placeholder

  • The * wildcard represents any group of characters in a file name

  • The ? wildcard represents a single character in a file name

Guide to UNIX Using Linux, Third Edition


Creating and removing directories and files

Creating and Removing 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 directory to another

  • rm (remove) command

    • Delete files

Guide to UNIX Using Linux, Third Edition


Configuring file permissions for security

Configuring File Permissions for Security

Guide to UNIX Using Linux, Third Edition


Configuring file permissions for security continued

Configuring File Permissions for Security (continued)

Guide to UNIX Using Linux, Third Edition


Configuring file permissions for security continued1

Configuring File Permissions for Security (continued)

  • 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

Guide to UNIX Using Linux, Third Edition


Chapter summary

Chapter Summary

  • In UNIX/Linux, a file is the basic component for data storage and UNIX and Linux consider everything a file

  • A file system is UNIX/Linux’s way of organizing files on mass storage devices and each file is referenced using a correct and unique pathname

  • The section of the mass storage device that holds a file system is a partition

Guide to UNIX Using Linux, Third Edition


Chapter summary continued

Chapter Summary (continued)

  • You can 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

  • Use the chmod command to set permissions such as read (r), write (w), execute (x) for files that you own

Guide to UNIX Using Linux, Third Edition


  • Login