Agenda The Linux File System (chapter 4 in text) Linking Files Hard Links / Symbolic Links Disk Storage Checking for Disk Space (df / du) Archiving (Backing.

Slides:



Advertisements
Similar presentations
Chapter 9 Part III Linux File System Administration
Advertisements

Agenda The Linux File System (chapter 4 in text) Directory Structures / Navigation Terminology / File Naming Rules Relative vs Absolute pathnames mkdir,
The Unix File System. What are the three parts of every file on a Unix filesystem? And where is each stored? Filename - stored in directories Inode -
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Jan. 27 th, 2009 Essential Unix Commands.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
Yukon Chang, Fall 1996 Operating System (II) Chapter 11 Supplement Slide 1 UNIX File System Layout u boot block contains bootstrap code that is read into.
Lesson 22 – Introduction to Linux Systems Administration.
Linux+ Guide to Linux Certification, Second Edition
UNIX Chapter 11 File Sharing Mr. Mohammad Smirat.
Links Learning Objectives: 1. To understand the basics of links & its usage 2. To learn the construction / removal of different types of links 3. To distinguish.
More Shell Basics CS465 - Unix. Unix shells User’s default shell - specified in /etc/passwd file To show which shell you are currently using: $ echo $SHELL.
Linux+ Guide to Linux Certification Chapter 12 Compression, System Backup, and Software Installation.
CS 497C – Introduction to UNIX Lecture 13: - The File System Chin-Chih Chang
Linux+ Guide to Linux Certification, Third Edition Chapter 11 Compression, System Backup, and Software Installation.
Chapter 11 Compression, System Backup, and Software Installation.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Linux+ Guide to Linux Certification
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Offline File Storage. Module 12 Offline File Storage ♦ Introduction Backup is usually done by first collecting all the data in a single archive file,
1 File Management Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of Technology
Basic unix commands that everyone should know (Even if you have a mac) Slightly more advanced:
Linux Operations and Administration
Linux+ Guide to Linux Certification, Second Edition
Linux+ Guide to Linux Certification Chapter Thirteen Compression, System Back-Up, and Software Installation.
Chapter 6: Linux Filesystem Administration
1 Lecture 5 Additional useful commands COP 3353 Introduction to UNIX.
Workbook 5 - Part 2 The Linux Filesystem RH030 Linux Computing Essentials.
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
Chapter 11 File Sharing. Sharing Techniques Duplicate files Common login Setting appropriate access permissions on shared files Common group for team.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
CS 149: Operating Systems April 9 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
Guide to Linux Installation and Administration1 Chapter 4 Running a Linux System.
4061 Session 12 (2/22). Today Files and Directories.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
Creating and Managing File Systems. Module 5 – Creating and Managing File Systems ♦ Overview This module deals with the structure of the file system,
Chapter 4: File Security & Permissions Also: Hard and Soft Links, see p77-80 &
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification Chapter Six Linux Filesystem Administration.
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.
Linux Commands C151 Multi-User Operating Systems.
Agenda The Linux File System (chapter 4 in text)
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Feb 3 rd, 2009 Essential Unix Commands …the second half.
CSC414 “Introduction to UNIX/ Linux” Lecture 6. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Fall 2013 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
Chapter Linux Basics. Acknowledgements This presentation was prepared by – Banyat Settapanich – Bahran Madaen This presentation will be updated later.
CSCI 330 UNIX and Network Programming Unit II Basic UNIX Usage: File System.
EMT 2390L Lecture 3 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
File Sharing via Links Chien-Chung Shen CIS, UD
Week Seven Agenda Link of the week Review week six lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming deadlines.
Linux Filesystem Administration
Chapter 11 File Sharing. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives  To explain different ways of sharing files  To discuss.
Introduction to Unix – CS 21
Agenda The Linux File System (chapter 4 in text)
Backing Up Your System With rsnapshot
Chapter 11 Command-Line Master Class
BIF713 Managing Disk Space.
Chapter 7 Installing Program &Backup Tool
A Guide to Unix Using Linux Fourth Edition
Introduction to Computers
The Linux Command Line Chapter 18
Lecture 43 Syed Mansoor Sarwar
OPS235 PACKAGE MANAGEMENT
Lecture 5 Additional useful commands COP 3353 Introduction to UNIX 1.
Hard Link when a file is copied, both the original and copy occupy separate space on the disk. unix allows a file to have more than one name and yet maintain.
The Linux Command Line Chapter 4
Lecture 5 Additional useful commands COP 3353 Introduction to UNIX 1.
The Linux Command Line Chapter 4
Presentation transcript:

Agenda The Linux File System (chapter 4 in text) Linking Files Hard Links / Symbolic Links Disk Storage Checking for Disk Space (df / du) Archiving (Backing up) Files (tar, gzip, gunzip, rpm)

Linking Files Since UNIX is a multi-user operating system, it makes sense to allow users to share files to collaborate on projects (such as programming projects, reports, etc.) In order to avoid duplication and inefficiency, it is better to provide links between files to give user illusion that what is edited on their file affects contents on other groups’ files.

Linking Files There are two major types of links: Hard Link: ln [existing_file] [linked_file] A directory entry containing the same “i-node number” of a file. All files have at least one hard- link - when removed, the link is removed Symbolic Link: ln -s [existing_file] [linked_file] A directory entry containing pathname to file (i.e. a pointer). Unlike hard links, i-node numbers can be different, but possess other useful features.

Linking Files Remember to set appropriate permissions for: your directories (such as pass-through permissions and permissions for appropriate directory) the file to link (which groups can modify the link file, which groups can view, but not modify file, and which groups are not permitted to modify or view linked file)

Hard Link Features Cannot make hard links to directories Cannot cross different file systems (since other file system may use i-node number for a already existing file…) User can allow access to file to link via directory access permissions and will still allow access if user later block group & other access. When “original file” that other user’s linked to is removed “linked file(s)’ will still exist.

Soft Link Features Can be used by users to link directories Can link across different file systems since they are considered to be “pointers” “Broken Links” can occur if original file is removed and link “points” to a file that does not exist.

Disk Storage It is important as a Unix or Linux administrator to periodically check on disk space to maintain efficiency. Consequences of full disk: Slower running System Longer to access data Running wrong programs or “outdated” programs by mistake

Disk Storage Unix Commands: df displays the amount of disk space available on the filesystem containing each file name argument. If no file name is given, the space available on all currently mounted filesystems is shown. du summarizes disk usage of each FILE, recursively for directories

Compressed Files One way to deal with running out of disk space is to “compress” files. There are many ways in which a file may be compressed. How Do Files get Compressed? One method of compressing text files is using Active Pattern Substitution. Using this compression method, common patterns in text such as recurring words or “strings” are replaced or substituted with a shorter string.

Example of a Compressed File Look at the following sentence: hey diddle diddle the cat and the fiddle (40 characters - including spaces) Substitute # for “the” for “iddle”: hey # cat and # (Only 24 characters - almost half the size of the original file!) Utilities and programs can be used to “compress” and “decompress” files

File Compression Utilities  tar(.tz) Tape Archive – A method used to compress files on tape (prior to disks). A compressed file using this utility is referred to as a “tarball”.  gzip / gunzip (.g ) A popular method for compressing files. Similar to “zip” and “unzip” commands for MS-DOS.  tar + gzip (.gtz) Referred to as a “zipped tarball”, the file is first compressed by the tar command, and then “tarball” is further compressed by gzip command to save additional space.

File Compression Utilities rpm (.rpm) Stands for “Red Hat Package Managers” which was developed by Red Hat Linux as a more “user-friendly” method of installing applications in Linux (as opposed to decompressing “zipped tarballs” and performing a manual installation. Please refer to the online man pages for each utility and corresponding options…