Essential Unix (and Linux) for the Oracle DBA. Revision no.: PPT/2K403/02

Size: px
Start display at page:

Download "Essential Unix (and Linux) for the Oracle DBA. Revision no.: PPT/2K403/02"

Transcription

1 Essential Unix (and Linux) for the Oracle DBA Revision no.: PPT/2K403/02

2 Architecture of UNIX Systems 2

3 UNIX System Structure 3 Operating system interacts directly with Hardware Provides common services to programs Insulating from Hardware Kernel is treated as an operating system Programs are independent of the Hardware Easy to move on different processing environment Programs should be independent of Hardware

4 UNIX System Structure (contd.) 4 Programs in the upper layer communicate with Kernel using defined set of system calls System calls instruct the Kernel to do various operations System calls also exchange the data between Kernel and program Some Standard programs also fall in this layer i.e. executable files by C compiler Top most layer is used for other application programs eg. C compiler (CC)

5 SHELL 5 It is a program that interprets the commands. If the command is valid then the shell directs the kernel to carry out the request If invalid then an error message is displayed. Shell starts when an user logs in, and terminates when the user logs out. Presence of shell is indicated by a special symbol known as the shell prompt ( $ or # ).

6 SHELL (contd.) 6 Several shells are available to handle the same hardware in different ways. Redirection of data : the shell facilitates chaining or "pipelining" of commands, i.e. the output of one program flows down the pipe and becomes an input to the next program.

7 SHELL (contd.) 7 Program execution Interpretive programming language File name substitutio n SHELL Environment control Pipeline hookup I/O Redirectio n

8 Different shells 8 Bourne shell or Standard shell (sh) : Introduced in 1978 and is widely used in AT&T Unix. Gives "$" as the prompt to the user and " # " to the superuser (root). One disadvantage is that it does not provide command history.

9 Different shells (contd.) 9 C shell (csh) : Gives "%" as the prompt to user. It is different from the sh. Syntax is similar to the C language programming. It is quite popular among the programmers. Provides aliasing of the command i.e. the ability to customize the command names.

10 Different shells (contd.) 10 Restricted shell (rsh) : Basically designed to restrict the rights of normal users It cannot execute cd command path variable command containing "/ redirect outputs

11 Different shells (contd.) 11 The Korn Shell The Korn shell is a product of AT&T Bell labs & was developed by David Korn. It has many novel features like the facility to edit the command line,the history mechanism, aliases & job control. Moreover the Korn shell also lets you handle computations awk-like formatted printing & simplified menu routines.

12 Accessing the Unix System 12 Directly from the server hosting the database itself Via a UNIX workstation Through a Windows NT Server front end.

13 Basic Unix Commands 13 cd date echo grep history passwd pwd uname Change directories Display time & date Display text on your screen Is a pattern-recognition command. Gives you the commands entered previously by users. $ history 3 To change users password Display present working directory Display the machines symbolic name

14 Basic Unix Commands 14 whereis As the name of this command indicates, whereis will give you the exact location of the executable file for the utility in question. $ whereis who: /usr/bin/who /usr/share/man1.z/who.1$ which Enables you to find out which version of a command the shell is using. $ /bin/cat$$ which cat who whoami Display list of all the users currently logged into the system. Indicates who you are logged in as.

15 Linux Environment 15 /etc/profile file owned and managed by the system administrator. It is used to automatically set the environment variables for users at login time. The shell looks in users home directory as an alternative location for environment information in the.profile file. env command is used to display the entire set of environment variables. Use export command to set any environment variable. Eg export ORACLE_SID=prod2

16 Input & output in Unix 16 Command < > >> << 2> Eg. Description Redirects standard input Redirects standard output Appends standard output to a file Appends standard input to a file Redirects standard error $ date > file1.txt $ file1 < file2.txt $ date file2

17 Files in the Unix system 17 Ordinary files These files can contain text, data, or programs. Directories Directories contain files & directories. Special files These files are use for input/output devices such as printers and terminals. Linking Files A symbolic link is a pointer to another file. $ ln clear cls

18 File Permission 18 ls l command list the details of file along with its permission. -rwx-x r 1 oracle dba Apr test.ksh chmod go+x test.ksh

19 File Permission (contd.) 19 SYMBOLIC PRIVILIGE x rw- -w- -wx r-- r-x rwx OCTAL NUMBER PRIVILEGE DESCRIPTION No privileges Execute only Write only Write & execute Read only Read & execute Read & write Read, write & execute

20 File Permission (contd.) 20 All files come with read & write privileges assigned Directories come with read, write, and execute privileges turned on. UNIX provides a feature called umask Umask changes the default permissions on new files An unmask with the value 022 means all new files will by default have the write permission denied to the group and others in the system.

21 Important Unix Directories 21 Directory /etc /dev /tmp /home root Description The /etc directory is where the system administrator keeps the system configuration file. Eg etc/passwd file The /dev directory has device files for example printer configuration files. The /tmp directory is where the system keeps temporary files. The home directory is the directory assigned to you by your UNIX administrator when he or she creates your initial account. The root directory, denoted simple by a forward slash (/), is owned by the system administrator 7 is the very top level of the treelike directory structure

22 VI EDITOR 22 Visual Editor is Unix system default editor. It allows you to move the cursor around in the edit buffer window easily. The cursor may be moved forward or backward a character, a word, a sentence or a paragraph at a time. Vi editor has three modes : Mode 1 command mode Mode 2 input mode Mode 3 ex mode

23 Modes in Visual editor 23 : prompt mode Press : Press Esc Key Command Mode Press Esc Key Press i or a key Editing mode

24 Set showmode 24 Till you can get familiar in working with vi, it is advisable that to use a command set showmode at the prompt, before you start editing. This command sets any of the parameters of the vi environment & displays a message at the bottom right of your screen, whenever the input mode is invoked. To set this mode enter a: ( the ex prompt) Then at the colon prompt type: :set showmode This is command in ex mode.

25 Command For Insertion 25 Command i I a A o O Operation Insert before cursor Insert at beginning of line Append after cursor Append at the end of the line Insert a blank line below cursor position Insert a blank line above cursor position

26 Command For Cursor Movements 26 Command h l j k 0 ^ Shift-G Shift-:1 Operation From current position one char towards left From current position one char towards right From current position one line towards down From current position one line towards down Takes cursor from any position of current line to the BOF current line. Go to start of the current line Go to the end of the file Go to the top of the file

27 Command For Cursor Movements 27 Command ^E ^Y ^U ^D ^F Operation Scroll down one line Scroll up one line Scroll up half a window Scroll down half a window Move window forward through the file.

28 Command For Cursor Movements (contd.) 28 ^b w e b :n :$ Move window backward through the file. Move forward to beginning of word End of the current word Move backward to the beginning of word To go to particular line (:10) To go to the last line of the file

29 Command For Deleting Text 29 Command x X dd dw D ndd ndw Operation Delete a char at the cursor position and line shift towards left (like del key) Delete a char at the previous cursor position and line shift towards left (like backspace key) Delete the current line Delete the current word Delete upto end of line from cursor position Delete n lines from current line Delete n words from current word

30 Command For Changing Text 30 Command r R ns C cw Operation Replace current character by later Replace more than one character (Press Esc key to terminate) Substitute n characters by any no. Of characters (Press Esc key to terminate) Change to end of line from cursor position (Press Esc key to terminate) Change word (Press Esc key to terminate)

31 Yanking (Copy & Paste) & Undo 31 Command yy Y p P nyy ny yw u U Operation From any position of current line yanks the current line Paste below the current line Paste above the current line Yanks n lines from current line yanks the current word Undo the last change (toggle between the current & last change) Cancels all the changes done on the current line.

32 Colon Prompt commands 32 Command w wq w <new file> q q! w! <new file> e <filename> e# rew n Operation Save Save & quit vi editor Save as new file Quit (provided file has been saved) Quit without saving Overwrite existing file To open another file Toggle between current & previous file To go the first file To move to the next file

33 Shell script 33 A shell programming is nothing but a series of Unix commands. Instead of doing one job at a time, u can give the shell a to-do list that carries out the entire procedure. Shell programs can be used for variety of tasks from customizing your environment to automating your daily tasks. Eg your.profile file

34 Defining variables $ displaying on the Screen 34 wish= Hello Everybody echo $wish Hello Everybody so to print the value of the variable use $ echo `who` will print output of the who command. Here ` (back quote) is used to print output of the command

35 Local & Global variables 35 Ordinarily shell variables is a local variable, means known only to the shell that created it. In order to make the old shell s variable available we use the export command. Eg export ME ME= cms echo $ME (prints cms) sh (defines new child shell) echo $ME (prints cms) ME= cms institute echo $ME (prints cms institute) press control D (to return to parent shell) echo $ME (prints cms)

36 Understanding the.profile file 36 When u log in to a UNIX system, the system looks into your directory for a file called.profile. This file contains startup instructions for your account. This file contains definitions for several shell variables, and it exports them to make global. Since your.profile file belongs to you, you modify it. Oracle also require.profile file to add some of its parameters.

37 Interactive shell scripts 37 Interactive shell scripts are based on using Unix shell commands read & echo, & on using shell variables. For example echo Dear user, what is your name\? read name echo Glad to meet you, $name In the above example we use the backslash to remove the special pattern-matching property of the question mark character

38 Command Substitution 38 What makes the set command useful in assigning positional parameter values is that its arguments need not be fixed in advance. When a command is enclosed in back-quotes, the command is replaced by the output it produces. This process is called command substitution Eg echo `who`

39 Script,Pipes& Redirection 39 A script can use pipes & redirection both internally & externally. For eg:- suppose we want a command that joins a list of files,passes the resulting file thro pr to format the file, & sends that output to lpr. This can be done by cat $* pr lpr

40 Loops in Shell script 40 A while-do-done loop while condition do commands done A for-do-done loop for var in list do commands done An until-do-done loop until condition do commands done

41 Conditional Branching 41 The if-then-else Control Structure If condition then action a else action b fi The case statement Case var in pattern1) commands ;; pattern2) commands ;; patternn) commands ;; esac

42 Unix Processes 42 When a shell program is executed, unix creates an active instance of your program called the process. Unix assign a unique identification number called the process ID (PID). A DBA should know how to track the processes that pertain to your programs and the database instance that you are managing. The ps command is used to find the processes running. The ps ef command will let you know the process ID, the user, the program the user is executing, and the length of the program s execution.

43 Terminating Processes with the kill command 43 Kill [ signal ] PID will kill the processes Kill will kill the processes running with the PID above.

44 Unix Backup and Restore Utilities 44 Tar and cpio commands are use to perform backups in unix. $ tar cvf /dev/rmt/0m /u10/oradata/data/data01.dbf will compress the file data01.dbf and copy it to a tape named /dev/rmt/0m. -cvf create a new archive. The following command will extract the backed up files from the tape to the specified directory: $ tar xvf /dev/rmt/0m /u20/oradata/data/data01.dbf

45 Unix Backup and Restore Utilities (contd.) 45 ls cpio 0 > /dev/rmt/0m Will copy the contents of the entire directory to the tape name /dev/rmt/0m cpio i < /dev/rmt/0m The cpio command with the i option restores all the contents of the tape named /dev/rmt/0m to the current directory

46 The Crontab and Automation of Scripts 46 DBAs will have to schedule their shell programs and other data loading programs for regular execution by the Unix administrator Unix provides the cron table to schedule database tasks. One can invoke the crontab by crontab 1. To add programs to the schedule or make scheduling changes, the command is crontab e. # minute hour date month day of week command * * 1-6 analyze.ksh # The preceding code indicates that the program analyze.ksh will be run Monday through Saturday at 6:30 P.M.

47 The Crontab and Automation of Scripts 47

48 48 Design & Published by: CMS Institute, Design & Development Centre, CMS House, Plot No. 91, Street No.7, MIDC, Marol, Andheri (E), Mumbai , Tel: ,

Std: XI CHAPTER-3 LINUX

Std: XI CHAPTER-3 LINUX Commands: General format: Command Option Argument Command: ls - Lists the contents of a file. Option: Begins with minus sign (-) ls a Lists including the hidden files. Argument refers to the name of a

More information

Appendix B WORKSHOP. SYS-ED/ Computer Education Techniques, Inc.

Appendix B WORKSHOP. SYS-ED/ Computer Education Techniques, Inc. Appendix B WORKSHOP SYS-ED/ Computer Education Techniques, Inc. 1 Introduction There are no workshops for this chapter. The instructor will provide demonstrations and examples. SYS-ED/COMPUTER EDUCATION

More information

5/20/2007. Touring Essential Programs

5/20/2007. Touring Essential Programs Touring Essential Programs Employing fundamental utilities. Managing input and output. Using special characters in the command-line. Managing user environment. Surveying elements of a functioning system.

More information

Introduction to UNIX Part II

Introduction to UNIX Part II T H E U N I V E R S I T Y of T E X A S H E A L T H S C I E N C E C E N T E R A T H O U S T O N S C H O O L of H E A L T H I N F O R M A T I O N S C I E N C E S Introduction to UNIX Part II For students

More information

Assignment clarifications

Assignment clarifications Assignment clarifications How many errors to print? at most 1 per token. Interpretation of white space in { } treat as a valid extension, involving white space characters. Assignment FAQs have been updated.

More information

Getting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers

Getting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers Chapter 2 Unix Utilities for non-programmers Graham Glass and King Ables, UNIX for Programmers and Users, Third Edition, Pearson Prentice Hall, 2003. Original Notes by Raj Sunderraman Converted to presentation

More information

Unix Introduction to UNIX

Unix Introduction to UNIX Unix Introduction to UNIX Get Started Introduction The UNIX operating system Set of programs that act as a link between the computer and the user. Developed in 1969 by a group of AT&T employees Various

More information

EECS 2031E. Software Tools Prof. Mokhtar Aboelaze

EECS 2031E. Software Tools Prof. Mokhtar Aboelaze EECS 2031 Software Tools Prof. Mokhtar Aboelaze Footer Text 1 EECS 2031E Instructor: Mokhtar Aboelaze Room 2026 CSEB lastname@cse.yorku.ca x40607 Office hours TTH 12:00-3:00 or by appointment 1 Grading

More information

Lecture # 2 Introduction to UNIX (Part 2)

Lecture # 2 Introduction to UNIX (Part 2) CS390 UNIX Programming Spring 2009 Page 1 Lecture # 2 Introduction to UNIX (Part 2) UNIX is case sensitive (lowercase, lowercase, lowercase) Logging in (Terminal Method) Two basic techniques: 1. Network

More information

Basic File Attributes

Basic File Attributes Basic File Attributes The UNIX file system allows the user to access other files not belonging to them and without infringing on security. A file has a number of attributes (properties) that are stored

More information

5/8/2012. Specifying Instructions to the Shell Chapter 8

5/8/2012. Specifying Instructions to the Shell Chapter 8 An overview of shell. Execution of commands in a shell. Shell command-line expansion. Customizing the functioning of the shell. Employing advanced user features. Specifying Instructions to the Shell Chapter

More information

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

h/w m/c Kernel shell Application s/w user Structure of Unix h/w m/c Kernel shell Application s/w. user While working with unix, several layers of interaction occur b/w the computer h/w & the user. 1. Kernel : It is the first layer which runs on

More information

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p. Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p. 2 Conventions Used in This Book p. 2 Introduction to UNIX p. 5 An Overview

More information

Introduction to Linux (Part II) BUPT/QMUL 2018/03/21

Introduction to Linux (Part II) BUPT/QMUL 2018/03/21 Introduction to Linux (Part II) BUPT/QMUL 2018/03/21 Contents 10. vi 11. Other commands 12. Developing tools 2 10. Editor - vi Text editor Insert mode Override mode Use sub-commands Tradition tools and

More information

Perl and R Scripting for Biologists

Perl and R Scripting for Biologists Perl and R Scripting for Biologists Lukas Mueller PLBR 4092 Course overview Linux basics (today) Linux advanced (Aure, next week) Why Linux? Free open source operating system based on UNIX specifications

More information

Editors in Unix come in two general flavours:

Editors in Unix come in two general flavours: Review notes #2 1. Unix account 2.Login: with a terminal or using telnet or ssh 3. Change password 4. Must logout! 5. Emails: (a) mutt (b) pine (c).forward file 6.Basic commands: who, ls, cat, more, man

More information

RH033 Red Hat Linux Essentials

RH033 Red Hat Linux Essentials RH033 Red Hat Linux Essentials Version 3.5 QUESTION NO: 1 You work as a Network Administrator for McNeil Inc. The company has a Linux-based network. A printer is configured on the network. You want to

More information

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

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers Review of the Linux File System and Linux Commands 1. Introduction Becoming adept at using the Linux OS requires gaining familiarity

More information

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University Unix/Linux Basics 1 Some basics to remember Everything is case sensitive Eg., you can have two different files of the same name but different case in the same folder Console-driven (same as terminal )

More information

12.1 UNDERSTANDING UNIX SHELL PROGRAMMING LANGUAGE: AN INTRODUCTION Writing a Simple Script Executing a Script

12.1 UNDERSTANDING UNIX SHELL PROGRAMMING LANGUAGE: AN INTRODUCTION Writing a Simple Script Executing a Script 12 Shell Programming This chapter concentrates on shell programming. It explains the capabilities of the shell as an interpretive high-level language. It describes shell programming constructs and particulars.

More information

UNIX Quick Reference

UNIX Quick Reference UNIX Quick Reference This card represents a brief summary of some of the more frequently used UNIX commands that all users should be at least somewhat familiar with. Some commands listed have much more

More information

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

3/8/2017. Unix/Linux Introduction. In this part, we introduce. What does an OS do? Examples EECS2301 Title Unix/Linux Introduction These slides are based on slides by Prof. Wolfgang Stuerzlinger at York University Warning: These notes are not complete, it is a Skelton that will be modified/add-to

More information

for more :-

for more :- JNTU ONLINE EXAMINATIONS [Mid 1 - UNIX] 1. C programmers in the unix environment has complete access to the entire system call library as well as the a. static library functions b. dynamic library functions

More information

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines Introduction to UNIX Logging in Basic system architecture Getting help Intro to shell (tcsh) Basic UNIX File Maintenance Intro to emacs I/O Redirection Shell scripts Logging in most systems have graphical

More information

FREEENGINEER.ORG. 1 of 6 11/5/15 8:31 PM. Learn UNIX in 10 minutes. Version 1.3. Preface

FREEENGINEER.ORG. 1 of 6 11/5/15 8:31 PM. Learn UNIX in 10 minutes. Version 1.3. Preface FREEENGINEER.ORG Learn UNIX in 10 minutes. Version 1.3 Preface This is something that I had given out to students (CAD user training) in years past. The purpose was to have on one page the basics commands

More information

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

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018 GNU/Linux 101 Casey McLaughlin Research Computing Center Spring Workshop Series 2018 rccworkshop IC;3df4mu bash-2.1~# man workshop Linux101 RCC Workshop L101 OBJECTIVES - Operating system concepts - Linux

More information

Chapter 1. Getting started with UNIX

Chapter 1. Getting started with UNIX Chapter 1. Getting started with UNIX The core of the UNIX operating system is the kernel. The kernel keeps records of all programs (commonly called processes) running on the system and shares time among

More information

Standard. Shells. tcsh. A shell script is a file that contains shell commands that perform a useful function. It is also known as shell program.

Standard. Shells. tcsh. A shell script is a file that contains shell commands that perform a useful function. It is also known as shell program. SHELLS: The shell is the part of the UNIX that is most visible to the user. It receives and interprets the commands entered by the user. In many respects, this makes it the most important component of

More information

Outline. Structure of a UNIX command

Outline. Structure of a UNIX command Outline Structure of Unix Commands Command help (man) Log on (terminal vs. graphical) System information (utility) File and directory structure (path) Permission (owner, group, rwx) File and directory

More information

Review of Fundamentals

Review of Fundamentals Review of Fundamentals 1 The shell vi General shell review 2 http://teaching.idallen.com/cst8207/14f/notes/120_shell_basics.html The shell is a program that is executed for us automatically when we log

More information

Unix as a Platform Exercises. Course Code: OS-01-UNXPLAT

Unix as a Platform Exercises. Course Code: OS-01-UNXPLAT Unix as a Platform Exercises Course Code: OS-01-UNXPLAT Working with Unix 1. Use the on-line manual page to determine the option for cat, which causes nonprintable characters to be displayed. Run the command

More information

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

Week Overview. Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages ULI101 Week 02 Week Overview Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages Text editing Common file utilities: cat,more,less,touch,file,find

More information

Software I: Utilities and Internals. What is vi?

Software I: Utilities and Internals. What is vi? Software I: Utilities and Internals Lecture 2 The vi Text Editor What is vi? vi is the most widely used full-screen text editor for UNIX and Linux system. vi is short for visual extension (of the lineoriented

More information

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs Summer 2010 Department of Computer Science and Engineering York University Toronto June 29, 2010 1 / 36 Table of contents 1 2 3 4 2 / 36 Our goal Our goal is to see how we can use Unix as a tool for developing

More information

EECS2301. Lab 1 Winter 2016

EECS2301. Lab 1 Winter 2016 EECS2301 Lab 1 Winter 2016 Lab Objectives In this lab, you will be introduced to the Linux operating system. The basic commands will be presented in this lab. By the end of you alb, you will be asked to

More information

UNIX Essentials Featuring Solaris 10 Op System

UNIX Essentials Featuring Solaris 10 Op System A Active Window... 7:11 Application Development Tools... 7:7 Application Manager... 7:4 Architectures - Supported - UNIX... 1:13 Arithmetic Expansion... 9:10 B Background Processing... 3:14 Background

More information

Unix Handouts. Shantanu N Kulkarni

Unix Handouts. Shantanu N Kulkarni Unix Handouts Shantanu N Kulkarni Abstract These handouts are meant to be used as a study aid during my class. They are neither complete nor sincerely accurate. The idea is that the participants should

More information

IMPORTANT: Logging Off LOGGING IN

IMPORTANT: Logging Off LOGGING IN These are a few basic Unix commands compiled from Unix web sites, and printed materials. The main purpose is to help a beginner to go around with fewer difficulties. Therefore, I will be adding to this

More information

Operating Systems, Unix Files and Commands SEEM

Operating Systems, Unix Files and Commands SEEM Operating Systems, Unix Files and Commands SEEM 3460 1 Major Components of Operating Systems (OS) Process management Resource management CPU Memory Device File system Bootstrapping SEEM 3460 2 Programs

More information

System Programming. Unix Shells

System Programming. Unix Shells Content : Unix shells by Dr. A. Habed School of Computer Science University of Windsor adlane@cs.uwindsor.ca http://cs.uwindsor.ca/ adlane/60-256 Content Content 1 Introduction 2 Interactive and non-interactive

More information

CISC 220 fall 2011, set 1: Linux basics

CISC 220 fall 2011, set 1: Linux basics CISC 220: System-Level Programming instructor: Margaret Lamb e-mail: malamb@cs.queensu.ca office: Goodwin 554 office phone: 533-6059 (internal extension 36059) office hours: Tues/Wed/Thurs 2-3 (this week

More information

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

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island Embedded Linux Systems Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island Generic Embedded Systems Structure User Sensors ADC microcontroller

More information

Operating Systems Lab 1 (Users, Groups, and Security)

Operating Systems Lab 1 (Users, Groups, and Security) Operating Systems Lab 1 (Users, Groups, and Security) Overview This chapter covers the most common commands related to users, groups, and security. It will also discuss topics like account creation/deletion,

More information

Introduction to Linux Workshop 1

Introduction to Linux Workshop 1 Introduction to Linux Workshop 1 The George Washington University SEAS Computing Facility Created by Jason Hurlburt, Hadi Mohammadi, Marco Suarez hurlburj@gwu.edu Logging In The lab computers will authenticate

More information

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems. Copyleft 2005, Binnur Kurt 3 Operating Systems Copyleft 2005, Binnur Kurt Content The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail.

More information

UNIX Basics. UNIX Basics CIS 218 Oakton Community College

UNIX Basics. UNIX Basics CIS 218 Oakton Community College UNIX Basics UNIX Basics CIS 218 Oakton Community College History UNIX was invented in 1969 at AT&T Bell Labs Ken Thompson and Dennis Ritchie are credited as the original architects and developers of C.

More information

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

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing Content 3 Operating Systems The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail. How to log into (and out

More information

Unix as a Platform Exercises + Solutions. Course Code: OS 01 UNXPLAT

Unix as a Platform Exercises + Solutions. Course Code: OS 01 UNXPLAT Unix as a Platform Exercises + Solutions Course Code: OS 01 UNXPLAT Working with Unix Most if not all of these will require some investigation in the man pages. That's the idea, to get them used to looking

More information

Chapter 9. Shell and Kernel

Chapter 9. Shell and Kernel Chapter 9 Linux Shell 1 Shell and Kernel Shell and desktop enviroment provide user interface 2 1 Shell Shell is a Unix term for the interactive user interface with an operating system A shell usually implies

More information

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

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an

More information

Practical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015

Practical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015 Practical Computing-II March 20, 2015 0. An Introduction About The Course CMS M.2.2 Practical Computing-II About The Course CMS M.2.2 Practical Computing-II 25 credits (33.33% weighting) About The Course

More information

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo UNIX COMMANDS AND SHELLS UNIX Programming 2015 Fall by Euiseong Seo What is a Shell? A system program that allows a user to execute Shell functions (internal commands) Other programs (external commands)

More information

Introduction to Linux Environment. Yun-Wen Chen

Introduction to Linux Environment. Yun-Wen Chen Introduction to Linux Environment Yun-Wen Chen 1 The Text (Command) Mode in Linux Environment 2 The Main Operating Systems We May Meet 1. Windows 2. Mac 3. Linux (Unix) 3 Windows Command Mode and DOS Type

More information

CHAPTER 3 SHELL PROGRAMS: SCRIPTS

CHAPTER 3 SHELL PROGRAMS: SCRIPTS CHAPTER 3 SHELL PROGRAMS: SCRIPTS Any series of commands may be stored inside a regular text file for later execution. A file that contains shell commands is called a script. Before you can run a script,

More information

100 SHELL PROGRAMS IN UNIX

100 SHELL PROGRAMS IN UNIX 100 SHELL PROGRAMS IN UNIX By Sarika Jain Head, MCA Department ABSS, Meerut (U.P.) Shivani Jain Senior Lecturer, Department of Computer Science VCE, Meerut (U.P.) FIREWAL MEDIA (An Imprint of Laxmi Publications

More information

System Programming. Introduction to Unix

System Programming. Introduction to Unix Content : by Dr. B. Boufama School of Computer Science University of Windsor Instructor: Dr. A. Habed adlane@cs.uwindsor.ca http://cs.uwindsor.ca/ adlane/60-256 Content Content 1 Introduction 2 3 Introduction

More information

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

Unix File System. Learning command-line navigation of the file system is essential for efficient system usage ULI101 Week 02 Week Overview Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages Text editing Common file utilities: cat,more,less,touch,file,find

More information

S E C T I O N O V E R V I E W

S E C T I O N O V E R V I E W PROGRAM CONTROL, FILE ARCHIVING, ENVIRONMENT AND SCRIPTS S E C T I O N O V E R V I E W Continuing from last section, we are going to learn about the following concepts: controlling programs; working with

More information

Introduction to the UNIX command line

Introduction to the UNIX command line Introduction to the UNIX command line Steven Abreu Introduction to Computer Science (ICS) Tutorial Jacobs University s.abreu@jacobs-university.de September 19, 2017 Overview What is UNIX? UNIX Shell Commands

More information

Lab 3a Using the vi editor

Lab 3a Using the vi editor Lab 3a Using the vi editor Objectives: Become familiar with the vi Editor Review the three vi Modes Review keystrokes to move between vi modes Create a new file with vi Editor Invoke vi with show mode

More information

Vi & Shell Scripting

Vi & Shell Scripting Vi & Shell Scripting Comp-206 : Introduction to Week 3 Joseph Vybihal Computer Science McGill University Announcements Sina Meraji's office hours Trottier 3rd floor open area Tuesday 1:30 2:30 PM Thursday

More information

QUESTION BANK ON UNIX & SHELL PROGRAMMING-502 (CORE PAPER-2)

QUESTION BANK ON UNIX & SHELL PROGRAMMING-502 (CORE PAPER-2) BANK ON & SHELL PROGRAMMING-502 (CORE PAPER-2) TOPIC 1: VI-EDITOR MARKS YEAR 1. Explain set command of vi editor 2 2011oct 2. Explain the modes of vi editor. 7 2013mar/ 2013 oct 3. Explain vi editor 5

More information

Shell Start-up and Configuration Files

Shell Start-up and Configuration Files ULI101 Week 10 Lesson Overview Shell Start-up and Configuration Files Shell History Alias Statement Shell Variables Introduction to Shell Scripting Positional Parameters echo and read Commands if and test

More information

Statistics 202A - vi Tutorial

Statistics 202A - vi Tutorial Statistics 202A - vi Tutorial Ryan Rosario October 16, 2007 vi is by far my favorite editor. The material for this handout came from http://www.eng.hawaii.edu/tutor/vi.html and credit is given to them.

More information

UNIT V. Dr.T.Logeswari. Unix Shell Programming - Forouzan

UNIT V. Dr.T.Logeswari. Unix Shell Programming - Forouzan UNIT V UNIX SYSTEM COMMUNICATION Dr.T.Logeswari 1 Electronic mail or email is easiest way of communication on unix. Fast and cheap Used to exchange graphics, sound and video files 2 3 Elements of a communication

More information

Introduction: What is Unix?

Introduction: What is Unix? Introduction Introduction: What is Unix? An operating system Developed at AT&T Bell Labs in the 1960 s Command Line Interpreter GUIs (Window systems) are now available Introduction: Unix vs. Linux Unix

More information

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description: BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description: This course provides Bioinformatics students with the

More information

AC109/AT109 UNIX & SHELL PROGRAMMING DEC 2014

AC109/AT109 UNIX & SHELL PROGRAMMING DEC 2014 Q.2 a. Explain the principal components: Kernel and Shell, of the UNIX operating system. Refer Page No. 22 from Textbook b. Explain absolute and relative pathnames with the help of examples. Refer Page

More information

The Online Unix Manual

The Online Unix Manual ACS-294-001 Unix (Winter Term, 2018-2019) Page 14 The Online Unix Manual Unix comes with a large, built-in manual that is accessible at any time from your terminal. The Online Manual is a collection of

More information

Introduction to Linux

Introduction to Linux p. 1/40 Introduction to Linux Xiaoxu Guan High Performance Computing, LSU January 31, 2018 p. 2/40 Outline What is an OS or Linux OS? Basic commands for files/directories Basic commands for text processing

More information

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12) Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12) Objective: Learn some basic aspects of the UNIX operating system and how to use it. What is UNIX? UNIX is the operating system used by most computers

More information

CHE3935. Lecture 1. Introduction to Linux

CHE3935. Lecture 1. Introduction to Linux CHE3935 Lecture 1 Introduction to Linux 1 Logging In PuTTY is a free telnet/ssh client that can be run without installing it within Windows. It will only give you a terminal interface, but used with a

More information

UNIX Commands. Ex: $ pwd $/tmp $cd/home/sales, this will change the directory from /tmp to /home/sales.

UNIX Commands. Ex: $ pwd $/tmp $cd/home/sales, this will change the directory from /tmp to /home/sales. UNIX Commands ls: File name and directory names are displayed using the ls command. This will display all the files and the directories which are present under that directory. $ls -l -rwxr-xr-x 1 sales

More information

5/8/2012. Encryption-based Protection. Protection based on Access Permission (Contd) File Security, Setting and Using Permissions Chapter 9

5/8/2012. Encryption-based Protection. Protection based on Access Permission (Contd) File Security, Setting and Using Permissions Chapter 9 File Security, Setting and Using Permissions Chapter 9 To show the three protection and security mechanisms that UNIX provides To describe the types of users of a UNIX file To discuss the basic operations

More information

Unix Basics. UNIX Introduction. Lecture 14

Unix Basics. UNIX Introduction. Lecture 14 Unix Basics Lecture 14 UNIX Introduction The UNIX operating system is made up of three parts; the kernel, the shell and the programs. The kernel of UNIX is the hub of the operating system: it allocates

More information

Basic Unix Command. It is used to see the manual of the various command. It helps in selecting the correct options

Basic Unix Command. It is used to see the manual of the various command. It helps in selecting the correct options Basic Unix Command The Unix command has the following common pattern command_name options argument(s) Here we are trying to give some of the basic unix command in Unix Information Related man It is used

More information

Examples: Directory pathname: File pathname: /home/username/ics124/assignments/ /home/username/ops224/assignments/assn1.txt

Examples: Directory pathname: File pathname: /home/username/ics124/assignments/ /home/username/ops224/assignments/assn1.txt ULI101 Week 03 Week Overview Absolute and relative pathnames File name expansion Shell basics Command execution in detail Recalling and editing previous commands Quoting Pathnames A pathname is a list

More information

Creating a Shell or Command Interperter Program CSCI411 Lab

Creating a Shell or Command Interperter Program CSCI411 Lab Creating a Shell or Command Interperter Program CSCI411 Lab Adapted from Linux Kernel Projects by Gary Nutt and Operating Systems by Tannenbaum Exercise Goal: You will learn how to write a LINUX shell

More information

CST Algonquin College 2

CST Algonquin College 2 The Shell Kernel (briefly) Shell What happens when you hit [ENTER]? Output redirection and pipes Noclobber (not a typo) Shell prompts Aliases Filespecs History Displaying file contents CST8207 - Algonquin

More information

1Z Oracle Linux Fundamentals (Oracle Partner Network) Exam Summary Syllabus Questions

1Z Oracle Linux Fundamentals (Oracle Partner Network) Exam Summary Syllabus Questions 1Z0-409 Oracle Linux Fundamentals (Oracle Partner Network) Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-409 Exam on Oracle Linux Fundamentals (Oracle Partner Network)... 2 Oracle

More information

UNIX System Programming Lecture 3: BASH Programming

UNIX System Programming Lecture 3: BASH Programming UNIX System Programming Outline Filesystems Redirection Shell Programming Reference BLP: Chapter 2 BFAQ: Bash FAQ BMAN: Bash man page BPRI: Bash Programming Introduction BABS: Advanced Bash Scripting Guide

More information

Computer Systems and Architecture

Computer Systems and Architecture Computer Systems and Architecture Introduction to UNIX Stephen Pauwels University of Antwerp October 2, 2015 Outline What is Unix? Getting started Streams Exercises UNIX Operating system Servers, desktops,

More information

Qedit 5.7 for HP-UX. Change Notice. by Robelle Solutions Technology Inc.

Qedit 5.7 for HP-UX. Change Notice. by Robelle Solutions Technology Inc. Qedit 5.7 for HP-UX Change Notice by Robelle Solutions Technology Inc. Program and manual copyright 1977-2005 Robelle Solutions Technology Inc. Permission is granted to reprint this document (but not for

More information

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1 Review of Fundamentals Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 GPL the shell SSH (secure shell) the Course Linux Server RTFM vi general shell review 2 These notes are available on

More information

Welcome to Linux. Lecture 1.1

Welcome to Linux. Lecture 1.1 Welcome to Linux Lecture 1.1 Some history 1969 - the Unix operating system by Ken Thompson and Dennis Ritchie Unix became widely adopted by academics and businesses 1977 - the Berkeley Software Distribution

More information

Implementation of a simple shell, xssh

Implementation of a simple shell, xssh Implementation of a simple shell, xssh What is a shell? A process that does command line interpretation Reads a command from standard input (stdin) Executes command corresponding to input line In simple

More information

Unix Internal Assessment-2 solution. Ans:There are two ways of starting a job in the background with the shell s & operator and the nohup command.

Unix Internal Assessment-2 solution. Ans:There are two ways of starting a job in the background with the shell s & operator and the nohup command. Unix Internal Assessment-2 solution 1 a.explain the mechanism of process creation. Ans: There are three distinct phases in the creation of a process and uses three important system calls viz., fork, exec,

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Mukesh Pund Principal Scientist, NISCAIR, New Delhi, India History In 1969, a team of developers developed a new operating system called Unix which was written using C Linus Torvalds,

More information

CS4350 Unix Programming. Outline

CS4350 Unix Programming. Outline Outline Unix Management Files and file systems Structure of Unix Commands Command help (man) Log on (terminal vs. graphical) System information (utility) File and directory structure (path) Permission

More information

Qedit 5.6 for HP-UX. Change Notice. by Robelle Solutions Technology Inc.

Qedit 5.6 for HP-UX. Change Notice. by Robelle Solutions Technology Inc. Qedit 5.6 for HP-UX Change Notice by Robelle Solutions Technology Inc. Program and manual copyright 1977-2005 Robelle Solutions Technology Inc. Permission is granted to reprint this document (but not for

More information

Appendix A GLOSSARY. SYS-ED/ Computer Education Techniques, Inc.

Appendix A GLOSSARY. SYS-ED/ Computer Education Techniques, Inc. Appendix A GLOSSARY SYS-ED/ Computer Education Techniques, Inc. $# Number of arguments passed to a script. $@ Holds the arguments; unlike $* it has the capability for separating the arguments. $* Holds

More information

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2 Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades 2017-2018 Q2 Facultat d Informàtica de Barcelona This first lab session is focused on getting experience in working

More information

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14 Introduction to Linux (Part I) BUPT/QMUL 2018/03/14 Contents 1. Background on Linux 2. Starting / Finishing 3. Typing Linux Commands 4. Commands to Use Right Away 5. Linux help continued 2 Contents 6.

More information

UNIX ASSIGNMENT 1 TYBCA (Sem:V)

UNIX ASSIGNMENT 1 TYBCA (Sem:V) UNIX ASSIGNMENT 1 TYBCA (Sem:V) Given Date: 06-08-2015 1. Explain the difference between the following thru example ln & paste tee & (pipeline) 2. What is the difference between the following commands

More information

Introduction to UNIX Command Line

Introduction to UNIX Command Line Introduction to UNIX Command Line Files and directories Some useful commands (echo, cat, grep, find, diff, tar) Redirection Pipes Variables Background processes Remote connections (e.g. ssh, curl) Scripts

More information

Using the Vi Text Editor

Using the Vi Text Editor Using the Vi Text Editor This document is intended to provide you with the basic information you need to use the vi text editor from your WAM/Glue or OIT cluster UNIX account. This document assumes that

More information

Linux & Shell Programming 2014

Linux & Shell Programming 2014 Practical No : 1 Enrollment No: Group : A Practical Problem Write a date command to display date in following format: (Consider current date as 4 th January 2014) 1. dd/mm/yy hh:mm:ss 2. Today's date is:

More information

Unix System Architecture, File System, and Shell Commands

Unix System Architecture, File System, and Shell Commands Unix System Architecture, File System, and Shell Commands Prof. (Dr.) K.R. Chowdhary, Director COE Email: kr.chowdhary@iitj.ac.in webpage: http://www.krchowdhary.com JIET College of Engineering August

More information

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1 Review of Fundamentals Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 The CST8207 course notes GPL the shell SSH (secure shell) the Course Linux Server RTFM vi general shell review 2 Linux

More information

Linux Shell Script. J. K. Mandal

Linux Shell Script. J. K. Mandal Linux Shell Script J. K. Mandal Professor, Department of Computer Science & Engineering, Faculty of Engineering, Technology & Management University of Kalyani Kalyani, Nadia, West Bengal E-mail: jkmandal@klyuniv.ac.in,

More information