Unix Filesystem. January 26 th, 2004 Class Meeting 2

Similar documents
Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

commandname flags arguments

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

UNIX File Hierarchy: Structure and Commands

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

You will automatically be in your user (home) directory when you login.

CS Unix Tools. Lecture 2 Fall Hussam Abu-Libdeh based on slides by David Slater. September 10, 2010

CSCI 2132 Software Development. Lecture 4: Files and Directories

Outline. Structure of a UNIX command

Working with Basic Linux. Daniel Balagué

A Brief Introduction to Unix

Overview of the UNIX File System. Navigating and Viewing Directories

Files

Introduction to Linux

Introduction to Linux

Overview of the UNIX File System

Introduction to Linux Part I: The Filesystem Luca Heltai

Introduction to Unix: Fundamental Commands

Introduction to the Linux Command Line

5/8/2012. Creating and Changing Directories Chapter 7

Introduction to Linux

Chapter-3. Introduction to Unix: Fundamental Commands

Commands are in black

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Week 2 Lecture 3. Unix

CS4350 Unix Programming. Outline

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering

CS246 Spring14 Programming Paradigm Notes on Linux

Getting your department account

CS197U: A Hands on Introduction to Unix

CHAPTER 1 UNIX FOR NONPROGRAMMERS

Outline. File Systems. File System Structure. CSCI 4061 Introduction to Operating Systems

Files and Directories

Introduction of Linux

Essential Linux Shell Commands

AN INTRODUCTION TO UNIX

Filesystem Hierarchy and Permissions

Mills HPC Tutorial Series. Linux Basics I

Filesystem Hierarchy and Permissions

Crash Course in Unix. For more info check out the Unix man pages -orhttp:// -or- Unix in a Nutshell (an O Reilly book).

Essential Unix and Linux! Perl for Bioinformatics, ! F. Pineda

INTRODUCTION TO LINUX

SECTION -C. Getting Started with UNIX

Unix Handouts. Shantanu N Kulkarni

Computer Systems and Architecture

Unix File System. Learning command-line navigation of the file system is essential for efficient system usage

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

Course 144 Supplementary Materials. UNIX Fundamentals

CS/CIS 249 SP18 - Intro to Information Security

Unix background. COMP9021, Session 2, Using the Terminal application, open an x-term window. You type your commands in an x-term window.

Introduction to Linux

Basic Survival UNIX.

h/w m/c Kernel shell Application s/w user

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

This section reviews UNIX file, directory, and system commands, and is organized as follows:

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Filesystem Hierarchy Operating systems I800 Edmund Laugasson

Physics REU Unix Tutorial

CSN08101 Digital Forensics. Module Leader: Dr Gordon Russell Lecturers: Robert Ludwiniak

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

Introduction to Linux

Perl and R Scripting for Biologists

Chapter 6. Linux File System

Introduction to Linux Basics

Introduction to Linux

The Directory Structure

Lecture 2: The file system

Linux/Cygwin Practice Computer Architecture

Unix Workshop Aug 2014

Week Overview. Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages

Introduction to UNIX command-line

Basic UNIX commands. HORT Lab 2 Instructor: Kranthi Varala

Std: XI CHAPTER-3 LINUX

CST8207: GNU/Linux Operating Systems I Lab Six Linux File System Permissions. Linux File System Permissions (modes) - Part 1

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

The UNIX Operating System. HORT Lecture 2 Instructor: Kranthi Varala

Introduction Into Linux Lecture 1 Johannes Werner WS 2017

The UNIX File System

Files (review) and Regular Expressions. Todd Kelley CST8207 Todd Kelley 1

CS Fundamentals of Programming II Fall Very Basic UNIX

Unix System Architecture, File System, and Shell Commands

The UNIX File System

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

Common UNIX Commands. Unix. User Interfaces. Unix Commands Winter COMP 1270 Computer Usage II 9-1. Using UNIX. Unix has a command line interface

CISC 220 fall 2011, set 1: Linux basics

Software I: Utilities and Internals

Session 1: Accessing MUGrid and Command Line Basics

Computer Systems and Architecture

Linux Command Line Primer. By: Scott Marshall

File System. yihshih

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

CSC209. Software Tools and Systems Programming.

genome[phd14]:/home/people/phd14/alignment >

LOG ON TO LINUX AND LOG OFF

3/8/2017. Unix/Linux Introduction. In this part, we introduce. What does an OS do? Examples

Transcription:

Unix Filesystem January 26 th, 2004 Class Meeting 2 * Notes adapted by Christian Allgood from previous work by other members of the CS faculty at Virginia Tech

Unix Filesystem! The filesystem is your interface to:! physical storage (disks) on your machine! storage on other machines! output devices! Everything in Unix is a file (programs, textfiles, peripheral devices, terminals)! There are no drive letters in Unix the filesystem is a logical view of the storage devices

Working Directory! Working Directory the current directory in which you are located! pwd (print working directory) command outputs the absolute path (more later) of your working directory! Unless you specify another directory, commands will assume that you want to operate on the working directory

Home Directory! Directory for users to store personal files! At login, your working directory will be set to your home directory! The path (more later) to your home directory can be referred to by the ~ (tilde) symbol! The home directory of user1 is represented by ~user1

Unix File Hierarchy! Root Directory: /! Directories may contain plain files or other directories! Result is a tree structure for the filesystem! Unix does not recognize any special filename extensions / bin home etc user1 textfile user2 cs2204 lab1txt lab2txt

Unix Paths! Separate directories by /! Absolute Path! start at root and follow the tree! Example:! /home/user1/textfile! ~users1/textfile! ~/textfile / bin home etc user1 user2 textfile lab1txt cs2204 lab2txt

Unix Paths (cont)! Relative Path! start at working directory!.. level above!. working directory / bin home etc user1 user2 textfile cs2204 lab1txt lab2txt

Some Standard Directories! / - root directory! /bin standard commands and utilities! /dev block and character device directory! /etc host-specific configuration files and directories! /home users directory! /lib library directory! /sbin system commands and utilities (needed to boot)! /tmp temporary files! /usr most user utilities and applications! /var files that vary as the system runs (logs, spools)

Changing Directories! cd changes the working directory! cd <directory_path>! can use absolute or relative path names! cd without any arguments is the same as: cd ~! Examples:! cd /home/user1! cd../../user1

Output of ls -lf lrwxrwxrwx 1 callgood Grads 20 Jan 24 20:16 home -> /home/grads/callgood/ -rw-r--r-- 1 callgood Grads 392419 Sep 22 10:07 atoll.jpg drwxr--r-- 2 callgood Grads 64 Jan 24 18:33 cs2204/ permissions user group modified date filename file type size! We ll keep coming back to this slide

Types of Files! Plain ( - )! Most files, binary or text! Directory ( d )! Directory is actually a file! Points to another set of files! Link ( l )! Pointer to another file or directory! Special! b block device (disks, CD-ROM)! c character device (keyboard, joystick)

Manipulating Files! touch <file>! create a new file or change last modified date! mv <file1> <file2>! rename file1 as file2! mv <file1> <dir>! move file1 into the dir directory! mv <file1> <dir/file2>! move file1 into dir and rename as file2! cp <file1> [<file2> <dir> <dir/file2>]! copy file with new name, into directory, or both! rm [-i] <file(s)>! remove file or list of files

Creating and Removing Directories! mkdir <directory_name>! create a subdirectory of the current directory! rmdir <directory_name>! remove directory! only works for empty directories! rm -r <directory_name>! remove directory and all of its contents, including subdirectories

Creating Links! ln -s <existing_file> <link_name>! creates a symbolic link! link_name will be a pointer to existing_file which may be in another directory or even on another physical machine

File Ownership! Each file has a single owner! chown command can be used to change the owner; usually only root user can use this command! Users can also belong to various groups! Groups may have different permissions than everyone else

File Permissions! Permissions are used to allow or disallow access to files or directories! Three types of permission:! Read ( r )! Write ( w )! Execute ( x )! Permission exists on three levels:! User ( u )! Group ( g )! World ( o )

File Permissions (cont)! chmod <mode> <file(s)>! chmod 700 textfile r w x user r w x group r w x world! chmod g+rw textfile ugo +/- rwx

File Modification Date! Last time a file was changed! Useful when...! there are many copies of a file! many users are working on a file! touch command can be used to update the modification date to the current date (or to create a file if it doesn t exist)

Looking at File Contents! cat <filename(s)>! short for concatenate! output the contents of the file all at once! more <filename(s)>! output the contents of the file one screen at a time! allows forward and backward search

Getting Help on Unix Commands! man <command_name>! shows all of the documentation for a command (more-style output)! apropos <keyword>! shows you all of the commands with the specified keyword in their description