June 1, 1999UNIX File System1 Introduction to UNIX D. UNIX File Structure.

Slides:



Advertisements
Similar presentations
Pre-Assessment Questions
Advertisements

CS 497C – Introduction to UNIX Lecture 11: - The File System Chin-Chih Chang
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 -
UNIX chapter 07 Files and File System Structure
Exploring the UNIX File System and File Security
The UNIX File System CS465. File Systems What is a file system? A means of organizing information on the computer. A file system is a logical view, not.
Linux+ Guide to Linux Certification, Second Edition
Chapter 5 Accessing Files and Directories. How Directories Get Created OS installation: usr, dev, etc, export, kernel and others places to store installation.
The UNIX File System.
Guide To UNIX Using Linux Third Edition
UNIX Files and Security Software Tools. Slide 2 File Systems l What is a file system? A means of organizing information on the computer. A file system.
Basic UNIX © McGraw Hill All rights reserved.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  Currently there.
Learning basic Unix command IT 325 operating system.
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #5  Files and directories in UNIX  Various types of files  File attributes  Notion of pathname  Commands.
Guide To UNIX Using Linux Fourth Edition
Notes Assignment #1 is due next Friday by 11:59 pm via Test #1 will be held Thursday February 18 at the start of class (one period long) Format:
Introduction to UNIX donna Bair-Mundy. What is UNIX? Applications OperatingSystem Hardware.
File Systems Sources and Resources: 1. A Students Guide to UNIX, by Hahn 2. Paula Davidson’s Handout on UNIXHandout on UNIX.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
The file structure and related utilities CS240 Computer Science II.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
Chapter 3. The Unix Filesystem. Files and Directories (1) u What is a file? –a container for ordered data –persistent (stays around) and accessible by.
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.
1 Lecture 2 Working with Files and Directories COP 3344 Introduction to UNIX.
June 1, 1999Manipulating Files1 Introduction to UNIX E. Manipulating Files.
June 1, 1999Using The C-Shell1 Introduction to UNIX F. Using C Shell Features.
Unix Basics Chapter 4.
Jozef Goetz, expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.
Linux+ Guide to Linux Certification, Second Edition
Linux overview. Architecture Kernel File system Shell: Korn, Bourne, C, Bash X Windows: Motif, Open Look, X.OrgX.Org Desktop: Gnome, KDE,etc.
Chapter Two Exploring the UNIX File System and File Security.
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
Managing Files. Module 5 Managing Files ♦ Introduction “On a Linux system, everything is a file; if something is not a file, it is a process.” ♦ Topics.
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:
Chapter Two Exploring the UNIX File System and File Security.
Chapter 4 The File Structure. Contents u The Hierarchical File Structure u Directory and Ordinary Files u Directories u Access Permissions u Links.
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:
1 © 2001 John Urrutia. All rights reserved. Chapter 4 The LINUX Filesystem.
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.
Λειτουργικά Συστήματα – Lab2 Γιάννης Πετράκης. Directory Navigation and Control  The Unix file system is set up like a tree branching out from the root.
Linux Commands C151 Multi-User Operating Systems.
Slide: 1 UNIX FILE SYSTEM By:Qing Yang ID: Operating System Research Topic December, 2000.
File Systems, telnet and ftp Sources and Resources: 1. A Students Guide to UNIX, by Hahn 2. Paula Davidson’s Handout on UNIXHandout on UNIX.
2 Manual & Filestore Mauro Jaskelioff. Introduction Using the manual The UNIX filestore File permissions.
1 Lecture 2 Working with Files and Directories COP 3353 Introduction to UNIX.
Agenda The Linux File System (chapter 4 in text)
BIF713 File and Directory Management. File System A File System is a structure used to organize programs and data on a computer ’ s storage device Files.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
A gentle introduction to LINUX at the command prompt.
Files and Directories in UNIX The first file in UNIX file system is “root” or “/”
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
The Unix File sytem. Introduction Tree structure …
1. user1 man lscpshtarvi bin libsbinsharelocalcontrib vue mail tmpvue grouppasswdprofile vmunix news user2 //// sbinusrdevetcoptvarstandtmphome 2.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Files and Filesystems.
File Management commands cat Cat command cat cal.txt cat command displays the contents of a file here cal.txt on screen (or standard out).
Chapter 2: Exploring the UNIX File System (For Tuesday Section) File and File Systems.
Agenda The Linux File System (chapter 4 in text) Directory Structures / Navigation Terminology File Naming Rules Relative vs Absolute pathnames Unix Commands:
BILKENT UNIVERSITY DEPARTMENT OF COMPUTER TECHNOLOGY AND INFORMATION SYSTEMS CTIS156 INFORMATION TECHNOLOGIES II FILES AND FILE SYSTEM STRUCTURE.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Commands Basic syntax of shell commands UNIX or shell commands have a basic structure command -options target command comes first (such as cd or ls) any.
Lecture 2 Working with Files and Directories
File and File System Structure
Exploring the UNIX File System and File Security
Unix : Introduction and Commands
Introduction Paul Flynn
Module 6 Working with Files and Directories
January 26th, 2004 Class Meeting 2
Presentation transcript:

June 1, 1999UNIX File System1 Introduction to UNIX D. UNIX File Structure

June 1, 1999UNIX File System2 Performance Objectives: 1. Identify types of Files (file) 2. Diagram the relationship of Files and Directories 3. Navigate the UNIX Directory Structure (cd, pwd) 4. Identify pathnames: Absolute (/) and Relative (... ~) 5. Define file naming conventions 6. Make and remove directories (mkdir, rmdir) 7. List files and directories and their attributes (ls)

June 1, 1999UNIX File System3 Types of Files Documents (ordinary files) Directories (help organize other files) Commands Special files - pipe | Hidden files (dot) Devices

June 1, 1999UNIX File System4 Relation of Files & Directories Root is like a file cabinet. n A directory is like a file drawer n A subdirectory is like a folder within a drawer. n A path is a list of directories & subdirectories from root to a specific file or subdirectory. / Root Directories Files

June 1, 1999UNIX File System5 UNIX Directory Structure At login, you are in your home directory. This is your current working directory. All files and directories below your home directory usually belong to you. You change your working directory by changing to another directory (cd).

June 1, 1999UNIX File System6 Pathnames Absolute Pathname : n shows the absolute position of a file or directory in the hierarchy; /home/user2/bif/docs n begins with a slash (/); and n describes how to get to the file from the root.

June 1, 1999UNIX File System7 Pathnames Relative Pathnames: n Describes how to get to a file from your current working directory. n Special characters represent directory locations. è home directory ~ ~chidhkra è current directory. cp ~chidhkra/file. è parent directory.. cp ~chidhkra/file..

June 1, 1999UNIX File System8 Filesystems A file is identified by n Combining directory pathnames n To the filename /usr/local/meeting root files usr local meeting /

June 1, 1999UNIX File System9 Naming Files Filenames may be 1 to 255 characters n UPPER and lowercase, n numbers, n other ASCII characters, n except special Shell characters, control characters and the space.

June 1, 1999UNIX File System10 Filename DON'TS Don't begin a filename with a dot (.) Don't use any of the following characters ; ? { } < : | * \ > # ( ) [ ] ' $ - & ~ " ! % /

June 1, 1999UNIX File System11 Examples of UNIX File Names: status.memo casey_mt chapter1

June 1, 1999UNIX File System12 Hidden Files (dot) Used to establish your environment:.cshrc.login.pinerc.forward Must use ls -a option to view Always in home directory (some exceptions)

June 1, 1999UNIX File System13 Naming Conventions Programs like make, cc, and sccs use a default conventions to name files generated:.o Binary Compiler Output. i C preprocessor Output.c C/C++ language source code.f Fortran source code.mk Makefiles s. SCCS files a.out executable name.j FPP output files.a AR or BLD files.Z compressed files (use uncompress).gz gzipped files (use gunzip).tar tape archive (use tar).l compiler listings

June 1, 1999UNIX File System14 Identifying File Content The command file identifies file content: host% file passwd passwd: ascii text host% file ~dhk/* PSaddress: PostScript document acl: directory address: [nt]roff, tbl, or eqn input text adv.fil: ascii text cfs.size: executable shell script dip: shell commands

June 1, 1999UNIX File System15 Directory Commands mkdirmaking a directory cdchanging your working directory pwdprinting your working directory lslisting the contents of a directory rmdirremoving a directory

June 1, 1999UNIX File System16 Directory Commands - mkdir Make directory under current working directory host% mkdir docs Make directory under subdirectory host% mkdir docs/index Make directory and subdirectory host% mkdir docs docs/index Make directory using absolute path host% mkdir /usr/tmp/abc User1 docs User1 docs index (cwd)

June 1, 1999UNIX File System17 Common Error Messages: mkdir: dirname: File exists mkdir: dirname: Permission denied

June 1, 1999UNIX File System18 Directory Commands - cd host% cd docs host% cd /usr/tmp/abc/docs host% cd ~abc/docs host% cd host% cd.. userx docs /usr tmp abc docs ~abc docs

June 1, 1999UNIX File System19 Common Error Messages: pathname: No such file or directory pathname: Permission denied

June 1, 1999UNIX File System20 Directory Commands - pwd Determining the current working directory: host% pwd /scc/users/chitspit/bif where: è / root è scc/ file system followed by the delimiter (/) è users/ subdirectory of scc è chitspit/ directory followed by the delimiter (/) è bif current working directory

June 1, 1999UNIX File System21 Directory Commands - ls host% ls bin mbox remodel complex.f outdis test host% ls -sF (Multiple options may be specified) 15 bin/ 256 mbox 3 remodel/ 34 complex.f 6 1 test* host% ls ~chitspit/bin au clst prod show xref cwd

June 1, 1999UNIX File System22 Directory Commands - ls The long list provides additional file information: host% ls -l total 31 drwxr-xr-x 2 dhk 512 Oct bin -rw-r--r-- 1 dhk 129 Nov comp -rw dhk 129 Jul 2 10:05 mbox -rw-r--r-- 1 dhk 4291 Jun 16 14:18 outdis drwxr-xr-x 2 dhk 512 Jan 22 11:07 remod -rwxr-xr-x 1 dhk Mar 19 12:55 test List alphabetized

June 1, 1999UNIX File System23 List Hidden Files: ls -a The -a option lists all files in a directory: host% ls -a..login mail test.. bin public_html.cshrc complex.f remodel

June 1, 1999UNIX File System24 Directory Commands - rmdir The rmdir command removes directories. host% rmdir bif/docs Directory must be empty. Common error messages: è rmdir: docs: Directory not empty è rmdir: /scc/users/abc/docs: Permission denied userx bif docs

June 1, 1999UNIX File System25 End of Module Complete UNIX File Structure Exercises