CT320

Three headers follow: ! Long name of class !! Semester !!! New Chapter 6, replaced by the name of the current page.

CT320: Network and System Administration

Fall 2013

New Chapter 6

Links to the various pages for this class:

Wish I could do this: * Schedule

See this page as a slide show

The Filesystem

Original slides from Dr. James Walden at Northern Kentucky University.

Topics

  1. Overview
  2. Pathnames
  3. Mounting
  4. Structure
  5. Organization
  6. File types
  7. Kernel Data Structures

Overview

Filesystem Components

Filesystem Types

https://en.wikipedia.org/wiki/Comparison_of_file_systems

Hierarchy

Files are located by traversing a directory tree:

Linux filesystem is a single unified hierarchy, unlike Windows.

Filenames

Mounted Filesystems

Global filesystem contains mounted filesystems:

Mounting

Unmounting

Identify Processes

fuser -mv /MST3K (Shows all open files, processes, and executables)

CodeMeaning
fProcess has an open file
cProcess has a current working directory
eProcess is currently executing a file
rProcess has set a root directory (chroot)
mProcess has mapped a file or a shared library

Filesystem Structure

Examples

    $ ls -l /etc/passwd
    -rw-r--r--. 1 root root 2733 May 17 12:46 /etc/passwd
    $ ls -i /etc/passwd
    1468033 /etc/passwd
    $ stat /etc/passwd
    File: `/etc/passwd’
    Size: 2733 Blocks: 8 IO Block: 4096 regular file
    Device: 802h/2050d Inode: 1468033 Links: 1
    Access: (0644/-rw-r--r--) Uid: (0/ root) Gid: (0/ root)
    Access: 2012-08-29 18:50:01.213638229 -0600
    Modify: 2012-05-17 12:46:25.000000000 -0600
    Change: 2012-05-18 18:41:06.000000000 -0600

Filesystem Organization

Standard directories

DirectoryMeaningDirectoryMeaning
/bootBoot directory/usrMost standard programs
/devDevice files/varSpool directories
/etcCritical system files/homeMount point for users
/sbinSystem utilities/libLibs and parts of the C compiler
/binImportant utilities/mediaRemovable media
/tmpTemp files/optOptional applications

Standard directories

/usr/binMost commands and executables
/usr/includeHeader files
/usr/libLibraries, support files for standard programs
/usr/localLocal software
/usr/local/binLocal executables
/usr/local/Other local (etc, lib, sbin, src)

Standard directories

/usr/manMan pages
/usr/sbinLess essential sysadmin commands
/usr/shareCommon to multiple systems
/usr/share/manShared man pages
/usr/srcSource code for nonlocal packages

Standard directories

/var/admLogs, system setup records
/var/logSystem log files
/var/spoolSpooling directories (mail, printers)
/var/tmpMore temp space (preserved between boots)

File Types

File types in the Linux filesystem:

File types

    $ ls -ld
    crw------- 1 root root 5, 1 Aug 24 15:24 /dev/console
    brw-rw---- 1 root disk 8, 0 Aug 24 15:23 /dev/sda
    srw-rw-rw- 1 root root    0 Aug 24 15:23 /dev/log

File type encoding

File typeSymbolCreated byRemoved by
Regular file-cp, mv, virm
Directorydmkdir, cp -rrmdir, rm -r
Character device filecmknodrm
Block device filebmknodrm
Local domain socketssocket(2)rm
Named pipepmknodrm
Symbolic linklln -srm

Regular file

Directories

Character and Block Device files

Local domain sockets

Named Pipes

Communication mechanisms

Symbolic links

Kernel Data Structures

    $ cat /proc/cpuinfo
    cpu family : 6
    model : 23
    model name : Intel(R) Core(TM)2 Duo CPU E8300 @ 2.83GHz
    cpu MHz : 1998.000
    cache size : 6144 KB

Modifying kernel parameters

Can be used to modify kernel parameters

    $ sysctl -a
    dev.cdrom.info = drive name: sr0
    dev.cdrom.info = drive speed: 48
    dev.cdrom.info = Can close tray: 1
    dev.cdrom.info = Can open tray: 1

Modified: 2013-09-07T22:48

User: Guest

Check: HTML CSS
Edit History Source
Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2015 Colorado State University
CS Building