A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 4: More Command Line Interface (CLI) Chapter 6: The Linux File System By Fred R. McClurg.

Slides:



Advertisements
Similar presentations
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 4: More Command Line Interface (CLI) Chapter 7: The Linux Shell By Fred R. McClurg Linux.
Advertisements

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 -
©Colin Jamison 2004 Introduction to Linux Colin Jamison.
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.
File Security. Viewing Permissions ls –l Permission Values.
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.
Linux Linux File System.
UNIX Chapter 00 A “ Quick Start ” into UNIX Operating System Mr. Mohammad Smirat.
Guide To UNIX Using Linux Third Edition
Linux Commands LINUX COMMANDS.
Guide To UNIX Using Linux Fourth Edition
Filesystem Hierarchy Standard (FHS) –Standard of outlining the location of set files and directories on a Linux system –Gives Linux software developers.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
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”
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.
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.
Linux Directory Navigation. File & Directory Commands This is a minimal list of Unix commands that you must know for file management: ls (list) mkdir.
1 Lecture 2 Working with Files and Directories COP 3344 Introduction to UNIX.
Unix Basics Chapter 4.
Introduction to Computer Organization & Systems Topics: Intro to UNIX COMP John Barr.
File Permissions. What are the three categories of users that apply to file permissions? Owner (or user) Group All others (public, world, others)
Linux+ Guide to Linux Certification, Second Edition
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 8: Installing Software in Linux Chapter 13: Downloading and Installing Software By Fred R.
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.
Lesson 9-Setting and Using Permissions. Overview Describing file permissions. Using execute permissions with a file. Changing file permissions using mnemonics.
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 9: Linux Network Services Chapter 16: Administration Tasks By Fred R. McClurg Linux Operating.
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.
Chapter Two Exploring the UNIX File System and File Security.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
UNIX An Introduction. Brief History UNIX UNIX Created at Bell Labs, 1969 Created at Bell Labs, 1969 BSD during mid 70s BSD during mid 70s AT&T began offering.
Chapter 4: File Security & Permissions Also: Hard and Soft Links, see p77-80 &
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
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.
1 Lecture 2 Working with Files and Directories COP 3353 Introduction to UNIX.
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
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.
The Unix File System R Bigelow. The UNIX File System The file system refers to the way in which UNIX implements files and directories. The UNIX file system.
Learning basic Unix command It 325 operating system.
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 Filesystem Management
Chapter 11 Command-Line Master Class
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
IT244 - Introduction to Linux / Unix Instructor: Bo Sheng
UNIX Basics Internet Technology.
Introduction to UNIX.
Exploring the UNIX File System and File Security
Unix : Introduction and Commands
Web Programming Essentials:
A Brief Overview of Unix
UNIX Commands A Brief Look at Common UNIX Commands.
UNIX Commands A Brief Look at Common UNIX Commands.
UNIX Commands A Brief Look at Common UNIX Commands.
Linux Commands LINUX COMMANDS.
UNIX Commands A Brief Look at Common UNIX Commands.
Chapter 4: The Linux Filesystem
January 26th, 2004 Class Meeting 2
Presentation transcript:

A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 4: More Command Line Interface (CLI) Chapter 6: The Linux File System By Fred R. McClurg Linux Operating System © Copyright 2015, All Rights Reserved

Working With Directories Print Working Directory ◦ pwd Tilde in Pathnames ◦ vim ~/foo ◦ vim /home/frmcclurg/foo ◦ cat ~baw/.bashrc ◦ cat /home/baw/.bashrc

Absolute Pathnames Absolute pathnames start with slash “ / ”. Example: ◦ cd /home/frmcclurg/bin

Relative Pathnames Relative pathnames start from working directory (pwd). Examples: ◦ cd. Current directory ◦ cd.. Parent directory ◦ cd bin Down directory (child) ◦ cd../src Parallel directory src ◦ cd../.. Up two directores

Important Directories Linux Filesystem Hierarchy Standard (FHS), Feburary 14, 1994

which and whereis : Path of executable Syntax: which executable whereis executable whereis manpage 6

locate : File path keyword search Syntax: locate keyword 7

apropos : Man page keyword search Syntax: apropos keyword 8

apropos, locate, & grep : Narrow search Syntax: apropos keyword | grep string locate keyword | grep string 9

find : Swiss army knife search cmd Syntax: find [dir] [–name file] [–type f|d|l] [–print] [–exec cmd {} \;] 10

find: Search and execute cmd find. -name "*.c" -type f \ -print -exec ls -l {} \; 11

passwd : Change account password Syntax: passwd 12

Gives a fine grained access to files and directories File Permissions File Type File Permissions Links Owner Group Last Modified Date Size Filename ACL Flag

chmod: Changing Permissions Syntax: ◦ chmod [options] [u][g][o][+-][r][w][x] fileOrDirectory Permissions: ◦ - rwx rwx r-x User (Owner) Access Group Access Others (World) Access

chmod: by Mode Examples: ◦ chmod ugo+x script.bsh ◦ chmod go-rw secret.txt ◦ chmod ugo+rw readWriteMe ◦ chmod ugo-w readOnly.txt

chmod: By Numbers Syntax: ◦ chmod [options] [number] fileOrDir Example: ◦ chmod 754 script.pl Binary Perspective -rwxr-xr Integer Perspective -rwxr-xr

Command Line Editing Recall Command History ◦ Arrow Up: Previous Command ◦ Arrow Down: Next Command Editing History ◦ Arrow Left: Move Cursor Left ◦ Arrow Right: Move Cursor Right ◦ Ctrl+W: Word Delete Left ◦ Ctrl+U: Undo (Delete) Line Left

Unix Links Hard Link Symbolic Link

Hard Link Defined: File with multiple filenames Syntax: ln existing newLink

Hard Link Analogy: One man many aliases Jean-Pierre Delta One Jason Charles Bourne Cain Kane John Michael Kane Charles Briggs George P. Washburn Foma Kiniaev Mr. Cruet Gilberto de Piento Paul Kay David Webb

Hard Link vs Copy inode: File Control Structure (unique identifier) Listing inodes: ◦ ls -i file

Creating a Hard Link inode: Can be thought of as the address of a file

Hard Link Disadvantages No hard links to directories No hard links between file systems

Symbolic Link Description: ◦ Pointer to a file Syntax: ◦ ln -s existing newSymLink