CIS 118 Intro to LINUX Class Exercise Week 3. UNIX/LINUX filesystem (see Filesystem Hierarchy Standard): /

Similar documents
Project 3 Specification FAT32 File System Utility

o User ID (UID) The numerical equivalent of the username which is referenced by the system and applications when determining access privileges.

Assignment #5: Rootkit. ECE 650 Fall 2018

Technical Paper. Installing and Configuring SAS Environment Manager in a SAS Grid Environment

Technical Paper. Installing and Configuring SAS Environment Manager in a SAS Grid Environment with a Shared Configuration Directory

These tasks can now be performed by a special program called FTP clients.

INSTALLING CCRQINVOICE

Manual for installation and usage of the module Secure-Connect

Unix Filesystem. January 26 th, 2004 Class Meeting 2

I. Introduction: About Firmware Files, Naming, Versions, and Formats

Enabling Your Personal Web Page on the SacLink

Word 2007 The Ribbon, the Mini toolbar, and the Quick Access Toolbar

Managing Your Access To The Open Banking Directory How To Guide

Integrating the AXIGEN Messaging Solution with AMAVIS

Model WM100. Product Manual

Adverse Action Letters

OO Shell for Authoring (OOSHA) User Guide

DUO LINK 4 APP User Manual V- A PNY Technologies, Inc. 1. PNY Technologies, Inc. 34.

I. Introduction: About Firmware Files, Naming, Versions, and Formats

Xilinx Answer Xilinx PCI Express DMA Drivers and Software Guide

Proper Document Usage and Document Distribution. TIP! How to Use the Guide. Managing the News Page

Using the Swiftpage Connect List Manager

Migrating iway Data Quality Server Plans and Components on Windows

UNIX TUTOR. The UNIX operating system comprises three parts: The kernel, the standard utility programs, and the system configuration files.

Week 8 Lesson 8 03/21/18

Upgrading Kaltura MediaSpace TM Enterprise 1.0 to Kaltura MediaSpace TM Enterprise 2.0

Using the Swiftpage Connect List Manager

INTRODUCTION TO UNIX

Create Your Own Report Connector

Summary. Server environment: Subversion 1.4.6

Setting up the ncipher nshield HSM for use with Kerberized Certificate Authority

Scroll down to New and another menu will appear. Select Folder and a new

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

Campuses that access the SFS nvision Windows-based client need to allow outbound traffic to:

CaseWare Working Papers. Data Store user guide

LAB 7 (June 29/July 4) Structures, Stream I/O, Self-referential structures (Linked list) in C

I - EDocman Installation EDocman component EDocman Categories module EDocman Documents Module...2

Re-Flashing Your CDM-760 Advanced High-Speed Trunking Modem

CLIC ADMIN USER S GUIDE

Launching Xacta 360 Marketplace AMI Guide June 2017

FREE UP SPACE ON YOUR C: DRIVE IN "WINDOWS.."

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

Click Studios. Passwordstate. RSA SecurID Configuration

MediaTek LinkIt Development Platform for RTOS Memory Layout Developer's Guide

In Outlook, how do I allow other users to view my Calendar or other folders in my Exchange mailbox?

RSA ACE/Server 5.2 VERITAS Integration

IT Essentials (ITE v6.0) Chapter 5 Exam Answers 100% 2016

Manually Upgrading PostgreSQL 9.1 to PostgreSQL

SeaLinx Guide. Table of Contents

Project 4: System Calls 1

USER MANUAL. RoomWizard Administrative Console

TN How to configure servers to use Optimise2 (ERO) when using Oracle

CSE 361S Intro to Systems Software Lab #2

AvePoint Discovery Tool 3.5. User Guide

Getting started. Roles of the Wireless Palette and the Access Point Setup Utilities

HPE AppPulse Mobile. Software Version: 2.1. IT Operations Management Integration Guide

FAQ: Best practices for managing encryption key on OBM or ACB version 7? (5034)

Gmail and Google Drive for Rutherford County Master Gardeners

HOW-TO Use SAP SUIM OR RSUSR008_009_NEW to Analysing Critical Authorisations

RISKMAN REFERENCE GUIDE TO USER MANAGEMENT (Non-Network Logins)

Implementation of Authentication Mechanism for a Virtual File System

TIBCO Statistica Options Configuration

Xerox WorkCentre 7120/7125 Series User Instructions

Quick Start Guide. Basic Concepts. DemoPad Designer - Quick Start Guide

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

REV MESSAGE for UNIX/LINUX

Oracle Universal Records Management Oracle Universal Records Manager Adapter for Documentum Installation Guide

Faculty Textbook Adoption Instructions

TUTORIAL --- Learning About Your efolio Space

Your Project Plan and Smartsheet

WordPress Overview for School Webmasters

Constituent Page Upgrade Utility for Blackbaud CRM

Please contact technical support if you have questions about the directory that your organization uses for user management.


Introduction to Mindjet on-premise

The screenshots/advice are based on upgrading Controller 10.1 RTM to 10.1 IF6 on Win2003

MySqlWorkbench Tutorial: Creating Related Database Tables

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

AvePoint Timeline Enterprise for Microsoft Dynamics CRM

MyUni Adding Content. Date: 29 May 2014 TRIM Reference: D2013/ Version: 1

OUTLOOK 2016 TIPS. Outlook 2016 Tips

Gemini Intercom Quick Start Guide

CS4500/5500 Operating Systems Computer and Operating Systems Overview

AvePoint Pipeline Pro 2.0 for Microsoft Dynamics CRM

BI Publisher TEMPLATE Tutorial

Area Governors Module

The VMs in the CIS VLab (Virtual Lab) We will be using a number of different Virtual Machines (VMs) in VLab for this course.

ClassFlow Administrator User Guide

Web location for this presentation: Click on Meeting Notes

Focus University Training Document

Aras Innovator 8.1 Document #: Last Modified: 4/4/2007. Copyright 2007 Aras Corporation All Rights Reserved.

Ascii Art Capstone project in C

Refreshing Axiom TEST with a Current Copy of Production Axiom EPM June 20, 2014

DocAve Governance Automation 2

Kaltura MediaSpace TM Enterprise 2.0 Requirements and Installation

Getting Started with the Web Designer Suite

Reference Guide. Service Pack 3 Cumulative Update 2. Revision J Issued October DocAve 6: Control Panel

Quick Start Guide for EAB Campus Advisors

GPA: Plugin for OS Command With Solution Manager 7.1

CSE 3320 Operating Systems Computer and Operating Systems Overview Jia Rao

Transcription:

CIS 118 Intr t LINUX Class Exercise Week 3 UNIX/LINUX filesystem (see Filesystem Hierarchy Standard): / +----+-----+----+----+-----+----+-----+-----+----+----+----+ bin bt dev etc hme lib mnt prc sbin tmp usr var +---+---+ bin lib sbin /bin - stres essential binaries (prgrams) needed when bting the system r wrking in single user mde t maintain the system /bt - stres kernel images and bt cnfiguratin files /dev - stres device special files used t access hardware devices /etc - stres system cnfiguratin files /hme - stres the hme directries fr the individual users /lib - stres library mdules used by the cmmands /mnt - a munt pint fr ther strage devices /prc - a pseud filesystem fr cnveying data abut prcesses /sbin - stres cmmands required t administer the system /tmp - used fr temprary files /usr - used fr prgrams, libraries, dcumentatin, etc used by nrmal users /var - stred system data that varies r changes frequently such as system lgs, mail and print spl files Path: An abslute path is the exact lcatin f a file r directry starting frm the rt directry. Fr example: / +-----+-----+------+-----+ bin etc hme usr var +---------+ <userid1> <userid2> CIS118 A relative path gives the lcatin f a file r directry relative t the current directry../cis118. the abslute path t the ntes directry is /hme/<useridx>/cis118. An abslute path always starts with / Sme special symbls may be used in relative paths.. the current directry.. the parent directry ~ yur wn hme directry

Directry Cmmands: pwd - This cmmand prints the wrking directry. cd - This cmmand changes t a specified directry ls list directry cntents mkdir - creates a new directry: rmdir - remves an existing directry. ls cmmand examples 1. ls List the cntents f the current directry 2. ls /etc List the cntents f the /etc directry 3. ls -a Display all entries in the current directry HIDDEN files beginning with a perid.. 4. ls -l Display a lng r detailed listing f the current directry. 5. ls -al /etc Display a lng listing f the /etc directry including "hidden" files r subdirectries See als cmmands stat and file directry listing entry: There are a number f things that appear in a unix directry listing: 1. Permissins: read(r) write (w) execute(x) fr wner, grup, ther 2. Links: links t existing files. 3. Owner and grup: Unix is a multi-user perating system. Fr each file and directry, the filesystem keeps track f the file wner and grup. 4. Size in bytes: 5. Date: unix filesystem maintains 3 dates fr each file: - the last access date, - the last mdificatin date - the last change date The date that appears in a standard directry entry is the last mdificatin date (see tuch). 6. Filename: A sample directry entry: -rwxrw-r-- 1 xyz staff 12 Mar 7 12:35 runme - This is an rdinary file rwx The permissins fr the wner (xyz): read, write, execute rw- The permissins fr the grup (staff): read, write, nt execute r-- The permissins fr thers: read, nt write, nt execute 1 The number f links t the file xyz The wner staff The grup 12 The size (in bytes) Mar 7 12:35 The last time that the file was mdified runme The name f the file

1) Yur default directry is /hme/<cis r csc>/<userid> 2) cd What is yur current directry nw? cd ~ What is yur current directry nw? 3) cd. What is yur current directry nw? 4) cd.. What is yur current directry nw? ls -al 5) cd ~/CIS118 What is yur current directry nw? 6) cd /usr; cd bin What is yur current directry nw? 7) cd /bin What is yur current directry nw? 8) cd /usr/bin What is yur current directry nw? 9) cd../.. What is yur current directry nw? 10) cd /var/spl/mail. What is yur current directry nw? 11) cd.. What is yur current directry nw? 12) mkdir CIS118 13) cd CIS118 14) tuch this chmd 755 this ls al this tuch this ls al this 15) tuch that chmd u+rwx that; ls l that chmd g+rwx that; ls l that chmd +rwx that; ls l that chmd a-x that; ls l that ls al that ech Hi there > that; ls al that; cat that ech Hi there > that; ls al that; cat that ech Hi there >> that; ls al that; cat that 16) mkdir p week2/this/that cd week2 mkdir xx ls al umask 17) mkdir New.dir rmdir New.dir cd ~/week2 18) Shw lng directry listing under /. Under the fllwing directries: bin, bt, dev, etc, hme, lib, mnt, prc, sbin, tmp, usr, var using abslute path using the fllwing cmmands: ls al /<directry> mre hit ENTER, hit Spacebar. Type q and Enter: ls al /<directry> less hit ENTER, hit Spacebar. Type q and Enter: 19) Run the cmmands: ls -F /hme ls -F /bin What symbl des the -F ptin use t identify directries? What symbl des the -F ptin use t identify executable files? What is the purpse f the -F ptin f the ls cmmand..

File cmmands: mre - display file cntents ne screen at a time. On lder systems this cmmand was called page. ls al / mre [SpaceBar] - display the next screen [Enter] - advance 1 line b - g backwards /xyz - search fr the string xyz q quit less - a mre pwerful versin f mre ls al less head - display lines frm the beginning f a file. ls al head tail - display lines frm the end f a file cp - cpies a file r files cd ~ cd CIS118./hell.sh > ldfile cp ldfile newfile mkdir newdir cp ldfile newdir cp h* newdir: cpies all files with a filename beginning with the letter h t the directry newdir; if newdir is nt a directry, this cncatenates all files beginning with the letter f int a single file called newdir cp h? newdir cpies all files with tw letter filenames where the first letter is h t the directry newdir cp b[aeiu]t newdir cpies the files bat, bet, bit and but t the directry newdir mv - Mves instead f cpies, same syntax as cp. Als renames a file. mv newfile newdir rm - This cmmand deletes a file. rm file1 delete file1 rm * delete all files in the current wrking directry rm -i * prmpt t cnfirm befre deleting each file tuch - Changes the access and mdificatin time f a file t the current time. If the file des nt exist, tuch will create an empty file using that name. tuch ldfile2 find lcate files by name r ther attributes (see als lcate) fine name cre print exec rm {}; ln - create a link t an existing file.: ln -s filename linkname creates a link r a pinter. The link will be called linkname and it will pint t filename.

1. List all hidden files (filename begins with. ) yur wn hme directry. 2. Use head r tail t d the fllwing: Display the last 4 lines f the file /etc/passwd. Display the last 4 lines f the file /etc/grup. Display the first 10 lines f the file /etc/lgin.defs. 3. The cpy cmmand: Make a directry in yur HOME called WEEK2. Cpy frm yur hme directry t WEEK2. Make a cpy f.bash_prfile called bprfile. Cpy /etc/issue.net t yur HOME directry Cpy all files files t anther directry: Cpy the readme frm t the /tmp directry t yur HOME directry cp /etc/passwd ~ 4. In yur wn hme directry, use the tuch cmmand t create five files: ne, tw, three, fur and five. Get a directry listing t make sure that the cmmand wrked. 5. Practice making directries. In yur wn hme directry, make /dir1/dir2: dir1 and dir2. Get a directry listing t make sure that the cmmand wrked. In yur HOME directry make a link dir2sub t ~/dir1/dir2. 6. Practice mving files frm yur wn hme directry: Mve the readme file called t the directry dir2 frm abve Use a single cmmand t mve all hidden files in yur hme directry t dir2 frm abve. Rename readme t.readme and repeat abve. 7. Use the mve cmmand t rename files. Use the mve cmmand t change the name f the file called readme2 t readme.new. Create a subdirectry called aaa. Can yu use the mve cmmand t change the name f aaa t dir3? 8. Remving files In yur HOME directry tuch files r1, r2, r3 rm r[12] cp r[12] /tmp 9. tail, head tail /etc/passwd head -20 /etc/passwd 10. ln ech The quick brwn fx jumped ver the lazy dg. > test.txt ech The quick brwn fx jumped ver the lazy dg. >> test.txt 3 times ln s test2.txt test.txt cat test2.txt ls al test3.txt cat test3.txt ech The quick brwn fx jumped ver the lazy dg. > test2.txt cat test.txt, cat test3.txt; ls al test*.txt ech The quick brwn fx jumped ver the lazy dg. > test3.txt cat test.txt, cat test2.txt; ls al test*.txt rm test.txt cat test.txt, cat test2.txt; cat test3.txt; ls al test*.txt

Permissins -rwxrwxrwx Read, Write, Execute fr Owner, Grup, Other fr a file: withut read permissin, a user cannt view the cntents f a file withut write permissin, a user cannt mdify the cntents f the file withut execute permissin, a user cannt execute the file. fr a directry: withut read permissin, a user cannt get a directry listing withut write permissin, a user cannt create new files withut execute permissin, a user cannt cd t the directry, list the directry cntents r save a file in the directry. chmd - change permissins. Read, write and execute permissins are set fr three grups: the wner, the grup and everyne else. chmd 543 myfile wuld set access rights as fllws: wner: 5 = 101 binary = read, nt write, execute grup: 4 = 100 binary = read, nt write, nt execute thers: 3 = 011 binary = nt read, write, execute chmd - versin 2 permissins can als be set using a text representatin u - user r wner g - grup - thers r - read permissin w - write permissin x - execute permissin chmd u+w file1 adds write permissin fr the user chmd +w file1 adds write permissin fr the user, grup and thers chmd g-x file1 deletes execute permissin fr the grup and thers chmd u=r file1 changes the permissins fr the user t be just read permissin (grup and ther permissins are nt changed) umask sets default unmask bits

1. ls al /etc ls al /etc/paswd tuch file1 chmd 444 file1 ls al file1 chmd ug+w file1 ls al file1 mkdir dir1 tuch dir1/test chmd 444 dir1 cd dir1 tuch dir1/test chmd 544 dir1 cd dir1 tuch dir1/test chmd a+x dir1 cd dir1 tuch dir1/test