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.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Pre-Assessment Questions
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
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.
Introduction to Unix (CA263) File System
Exploring the UNIX File System and File Security
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
GNU/Linux Filesystem 1 st AUT GNU/Linux Festival Computer Engineering & IT Department Bahador Bakhshi.
Lesson 22 – Introduction to Linux Systems Administration.
Linux+ Guide to Linux Certification, Second Edition
Linux+ Guide to Linux Certification, Second Edition
6/24/2015B.RamamurthyPage 1 File System B. Ramamurthy.
The UNIX File System.
Guide To UNIX Using Linux Third Edition
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
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.
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.
UNIX command line. In this module you will learn: What is the computer shell What is the command line interface (or Terminal) What is the filesystem tree.
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.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Unix Basics Chapter 4.
An Introduction to UNIX System --- Cosc513 Presentation n Instructor: Morteza Anvari n Author: Yonghong Pan n ID#: n Date: Jan.29, 2001.
The UNIX Shell. The Shell Program that constantly runs at terminal after a user has logged in. Prompts the user and waits for user input. Interprets command.
Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux.
Linux+ Guide to Linux Certification, Second Edition
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.
Guide to Linux Installation and Administration, 2e1 Chapter 7 The Role of the System Administrator.
Unix/Linux cs3353. The Shell The shell is a program that acts as the interface between the user and the kernel. –The shell is fully programmable and will.
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:
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
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.
ITR3 lecture 6: intoduction to UNIX Thomas Krichel
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
Introduction to Programming Using C An Introduction to Operating Systems.
Managing Files CSCI N321 – System and Network Administration Copyright © 2000, 2007 by the Trustees of Indiana University except as noted.
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
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.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
Module 1 - Introduction to Linux. Users must log-in Linux is case sensitive File and Directories naming conventions (No spaces!) Files and Directories.
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
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
LINUX Zhengli Zhu, School of Life Sciences. Outline 1. ABC of Linux 2. Basic orers of Linux 3. Bash Programming.
Getting Started with Linux
Linux 101 Training Module Linux Basics.
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
Linux file system "On a UNIX system, everything is a file;
Chapter 2: System Structures
Exploring the UNIX File System and File Security
Unix : Introduction and Commands
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Chapter 7 File and file System structure
Chapter 4: The Linux Filesystem
A shell is a user interface.
January 26th, 2004 Class Meeting 2
Presentation transcript:

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 kernel and shell Find lost and hidden files Create, move and delete files and directories Display contents of files Understand and use different link types Find out about file properties and change file permissions

Files "On a UNIX system, everything is a file; if something is not a file, it is a process.“ 1)Regular file: executable program, text etc. 2)Directories: files that are lists of other files. 3)Special files: the mechanism used for input and output. Most special files are in /dev, 4)Links: a system to make a file or directory visible in multiple parts of the system's file tree. 5)(Domain) sockets: a special file type, similar to TCP/IP sockets, providing inter−process networking protected by the file system's access control. 6)Named pipes: act more or less like sockets and form a way for processes to communicate with each other, without using network socket semantics. The −l option to ls displays the file type, using the first character of each input line: ls – l / ls –F --color

File types in a long list

Partitions Why? to achieve higher data security in case of disaster. for security and robustness reasons, so a breach on one part of the system doesn't automatically mean that the whole computer is in danger.

There are two kinds of major partitions on a Linux system: –data partition: normal Linux system data, including the root partition containing all the data to startup and run the system; –swap partition: expansion of the computer's physical memory, extra memory on hard disk.

ROOT Space The standard root partition (indicated with a single forward slash, /) is about 100−500 MB, and contains the system configuration files, most basic commands and server programs, system libraries, some temporary space and the home directory of the administrative user. A standard installation requires about 250 MB for the root partition.

SWAP Space Swap space (indicated with swap) is only accessible for the system itself, and is hidden from view during normal operation. Swap is the system that ensures, like on normal UNIX systems, that you can keep on. On Linux, you will virtually never see irritating messages like Out of memory,please close some applications first and try again, because of this extra memory. Linux generally counts on having twice the amount of physical memory in the form of swap space on the hard disk.

The df command: df -h df -h.

Linux file system layout

Subdirectories of the root directory

The file system in reality Every partition has its own file system. In a file system, a file is represented by an inode, a kind of serial number containing information about the actual data that makes up the file: Owner and group owner of the file. File type (regular, directory,...) Permissions on the file Date and time of creation, last read and change. Date and time this information has been changed in the inode Number of links to this file File size An address defining the actual location of the file data. Every partition has its own set of inodes; throughout a system with multiple partitions, files with the same inode number can exist. The only information not included in an inode, is the file name and directory. These are stored in the special directory files. ls -i

The Path Absolute and relative paths

The most important files and directories The kernel: The kernel is the heart of the system. –It manages the communication between the underlying hardware and the peripherals. –The kernel also makes sure that processes and daemons (server processes) are started and stopped at the exact right times. The shell: –"a shell manages the interaction between the system and its users". –"bash is an sh−compatible command language interpreter,“ Your home directory: –echo $HOME –(~) –Use man or info quota

Shell Your default shell is set in the /etc/passwd file, like this line for user mia: 1.To switch from one shell to another, just enter the name of the new shell in the active terminal. 2.echo $SHELL

The most important configuration files stored in the /etc directory Also, man group

The most common devices entry in the /dev directory

The most common variable files In the /var directory we find a set of directories for storing specific non−constant data All files that change frequently, such as log files, mailboxes, lock files, spoolers etc. are kept in a subdirectory of /var. var/tmp and /tmp :temporary files /var/log : user login information /var/spool : scheduled tasks /var/spool/mail /var/lib/rpm: redhat package manager lib

Manipulating files ls –a ls −al ls −latr Color scheme:The standard scheme is in /etc/DIR_COLORS file command

Tools Creating directories: mkdir Moving files: mv Copying files: cp –R fromFileile toFile Remove files : rm –ri archive/

Finding files find document.gif ls dirname/*/*/*[2−3] Using shell features: Tab key twice which command: which –a ls find −name This can be interpreted as "Look in all files and subdirectories contained in a given path, and print the names of the files containing the search string in their name" (not in their content). Another application of find is for searching files of a certain size find. −size +5000k