Prof. Navrati Saxena TA: R. Sachan

Similar documents
Mills HPC Tutorial Series. Linux Basics I

CSE 303 Lecture 4. users/groups; permissions; intro to shell scripting. read Linux Pocket Guide pp , 25-27, 61-65, , 176

Linux & Shell Programming 2014

CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND

Prof. Navrati Saxena TA: R. Sachan Bharat Jyoti Ranjan

Introduction to Linux

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

Introduction: What is Unix?

CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1

Introduction. Let s start with the first set of slides

Introduction to Linux Workshop 1

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

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

Introduction to the UNIX command line

Lab Working with Linux Command Line

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

Scripting Languages Course 1. Diana Trandabăț

CS246 Spring14 Programming Paradigm Notes on Linux

Unix Introduction to UNIX

Introduction to Unix: Fundamental Commands

Chapter-3. Introduction to Unix: Fundamental Commands

Computer Architecture Lab 1 (Starting with Linux)

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

Linux Shell Script. J. K. Mandal

5/20/2007. Touring Essential Programs

Chapter 1 - Introduction. September 8, 2016

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

EECS2301. Lab 1 Winter 2016

Introduction to Cygwin Operating Environment

Shells. A shell is a command line interpreter that is the interface between the user and the OS. The shell:

History. Terminology. Opening a Terminal. Introduction to the Unix command line GNOME

Week 2 Lecture 3. Unix

A Brief Introduction to the Linux Shell for Data Science

Introduction to Supercomputing

GNU/Linux Course Lesson 1. Puria Nafisi

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

Manual Shell Script Linux If File Exists Wildcard

Introduction To Linux. Rob Thomas - ACRC

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

Introduction to Linux

Processes. Shell Commands. a Command Line Interface accepts typed (textual) inputs and provides textual outputs. Synonyms:

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

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

Topic 2: More Shell Skills. Sub-Topic 1: Quoting. Sub-Topic 2: Shell Variables. Difference Between Single & Double Quotes

Chap2: Operating-System Structures

Introduction to Linux. Fundamentals of Computer Science

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

Unix Tools / Command Line

Std: XI CHAPTER-3 LINUX

Getting your department account

EECS 2031E. Software Tools Prof. Mokhtar Aboelaze

UNIX Essentials Featuring Solaris 10 Op System

UNIX Shell Programming

The Unix Shell & Shell Scripts

Topic 2: More Shell Skills

Using Commands. Introduction to Unix. May 24, 2008 Rabat, Morocco. Hervey Allen

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

Introduction to Linux Basics

PROGRAMMAZIONE I A.A. 2015/2016

CS370 Operating Systems

CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater)

Topic 2: More Shell Skills

Common File System Commands

Welcome to Linux. Lecture 1.1

CST Algonquin College 2

CS 2400 Laboratory Assignment #1: Exercises in Compilation and the UNIX Programming Environment (100 pts.)

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

The Unix Shell. Pipes and Filters

COMS 6100 Class Notes 3

Using the Unix system. UNIX Introduction

Linux at the Command Line Don Johnson of BU IS&T

Linux Command Line Primer. By: Scott Marshall

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

Sub-Topic 1: Quoting. Topic 2: More Shell Skills. Sub-Topic 2: Shell Variables. Referring to Shell Variables: More

The Online Unix Manual

Practical 4. Linux Commands: Working with Directories

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

Chapter 4. Unix Tutorial. Unix Shell

EE516: Embedded Software Project 1. Setting Up Environment for Projects

The Directory Structure

Lecture 3. Unix. Question? b. The world s best restaurant. c. Being in the top three happiest countries in the world.

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

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

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

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

Outline. Structure of a UNIX command

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

CISC 220 fall 2011, set 1: Linux basics

Linux Command Line And Shell Scripting Bible 3rd Edition

commandname flags arguments

Introduction to Linux

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

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

Operating Systems. Lab Manual. Compiled by: Mr. Mohammed Al-Qadhi Computer Science Department

Introduction. File System. Note. Achtung!

A Brief Introduction to Unix

2) clear :- It clears the terminal screen. Syntax :- clear

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

Transcription:

Prof. Navrati Saxena navrati@ece.skku.ac.kr TA: R. Sachan rochak@skku.edu

What is UNIX Command What is UNIX Shell Linux file structure UNIX/LINUX Commands 2

A command is a program which interacts with the kernel to provide the environment and perform the functions called for by the user. A command can be: a built-in shell command; an executable shell file, known as a shell script; or a source compiled, object code file. The shell is a command line interpreter. The user interacts with the kernel through the shell. You can write ASCII (text) scripts to be acted upon by a shell. 3

The shell sits between you and the operating system, acting as a command interpreter. It reads your terminal input and translates the commands into actions taken by the system. The shell is analogous to command.com in DOS. When you log into the system you are given a default shell. When the shell starts up it reads its startup files and may set environment variables, command search paths, and command aliases, and executes any commands specified in these files. 4

The original shell was the Bourne shell, sh. Every Unix platform will either have the Bourne shell, or a Bourne compatible shell available. The default prompt for the Bourne Again Shell(BASH) is $ (or #, for the root user). Another popular shell is C Shell. The default prompt for the C shell is %. 5

6

File Management and Viewing File system Management Help, Job/Process Management Network Management System Management User Management Printing and Programming Document Preparation Miscellaneous 7

Common Shell Symbols ENTER Execute a command line Execution ; Separate commands on the same command line command Execute a command [ ] Match on a class of possible characters in the file names \ Quote the following character. Used to quote special characters. Pipes the standard output of one command as input for another command & Execute a command in the background! History command 8

Wildcard Symbols Execution * Match on any set of character in files name? Match on any single character in file names 9

Redirection Symbols Execution > Redirect the standard output to a file or device, creating the file if it does not exist and overwriting the file if it does exits >! The exclamation point forces the overwriting of a file if it already exists. This overrides the no clobber option. < Redirect the standard input from a file or device to a program. >> Redirect the standard output to a file or device, appending the output to the end of the file. 10

Standard Error Redirection Symbols Execution 2> Redirect the standard error to a file or divice 2>> Redirect and append the standard error to a file or device 2>&1 >& & Redirect the standard error to the standard output Redirect the standard error to a file or device Pipe the standard error as input to another command 11

This command shows your current logged in terminal user name $ whoami To understand the working of the command and possible options use (man command) $ man <command name> Using the GNU Info System (info, info command) $ <command name> info Listing a Description of a Program (whatis command) $ whatis <command name> 12

Listing/Viewing files: ls -demonstrates the existence of the new file Ls [option] [names] option -a, -all -b, --escape -d, --directory meaning List all files, including the normally hidden files whose na mes begin with a period. Display nonprinting characters in octal and alphabetic for mat. Report only on the directory, not its contents. -f Print directory contents in exactly the order in which they are stored, without attempting to sort them. -g Long listing like -l, but don't show file owners. -h Print sizes in kilobytes and megabytes. 13

Making Directories mkdir - to making a subdirectory Syntax: $ mkdir [Directory name] Change Directories cd- to change the current directory Syntax: $ cd [Directory name] Deleting Directories rm- to delete the directory/file Syntax: $ rm [option] [Directory name] 14

Searching Directories find- Search directories for files based on search Syntax: $ find [Directory List] [option] Ex.: $ find reports name Monday Moving Directories/files mv- to move file from one directory to other directory. Syntax: $ mv [file-name] [directory-name] Ex.: $ mv newprops props/version1 Copying Directories/files cp- to copy file from one direcory to another directory Syntax: $ cp [file-name] [Directory-name] EX.: $ cp preface doc1 props 15

Richard Petersen; "The Complete Reference, Linux, Fourth Edition", Osborne/McGraw-Hi ll, Christopher Negus; "Linux Bible, 2007 Editi on", Wiley Publishing, Inc http://www.freeos.com/guides/lsst/ http://bash.cyberciti.biz/guide/main_page 16