The Unix Shell. Job Control
|
|
- Gary Waters
- 6 years ago
- Views:
Transcription
1 The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See for more information.
2 shell
3 shell $ wc l *.pdb sort head -1
4 shell $ wc l *.pdb sort head -1 wc sort head
5 shell $ wc l *.pdb sort head -1 wc sort head Control programs while they run
6 shell $ wc l *.pdb sort head -1 wc sort head processes Control programs while they run
7 A process is a running program
8 A process is a running program Some are yours
9 A process is a running program Some are yours Most belong to the operating system (or other users)
10 A process is a running program Some are yours Most belong to the operating system (or other users) Use ps to get a list
11 $ ps A process is a running program Some are yours Most belong to the operating system (or other users) Use ps to get a list PID PPID PGID TTY UID STIME COMMAND con :19:07 /usr/bin/bash con :53:48 /usr/bin/ps $
12 $ ps A process is a running program Some are yours Most belong to the operating system (or other users) Use ps to get a list PID PPID PGID TTY UID STIME COMMAND con :19:07 /usr/bin/bash con :53:48 /usr/bin/ps $ Process ID (unique at any moment)
13 $ ps A process is a running program Some are yours Most belong to the operating system (or other users) Use ps to get a list PID PPID PGID TTY UID STIME COMMAND con :19:07 /usr/bin/bash con :53:48 /usr/bin/ps $ Parent process ID
14 $ ps A process is a running program Some are yours Most belong to the operating system (or other users) Use ps to get a list PID PPID PGID TTY UID STIME COMMAND con :19:07 /usr/bin/bash con :53:48 /usr/bin/ps $ Parent process ID What process created this one?
15 $ ps A process is a running program Some are yours Most belong to the operating system (or other users) Use ps to get a list PID PPID PGID TTY UID STIME COMMAND con :19:07 /usr/bin/bash con :53:48 /usr/bin/ps $ Process group ID
16 $ ps A process is a running program Some are yours Most belong to the operating system (or other users) Use ps to get a list PID PPID PGID TTY UID STIME COMMAND con :19:07 /usr/bin/bash con :53:48 /usr/bin/ps $ What terminal (TTY) is it running in?
17 $ ps A process is a running program Some are yours Most belong to the operating system (or other users) Use ps to get a list PID PPID PGID TTY UID STIME COMMAND con :19:07 /usr/bin/bash con :53:48 /usr/bin/ps $ What terminal (TTY) is it running in? '?' indicates a system service (no TTY)
18 $ ps A process is a running program Some are yours Most belong to the operating system (or other users) Use ps to get a list PID PPID PGID TTY UID STIME COMMAND con :19:07 /usr/bin/bash con :53:48 /usr/bin/ps $ The user ID of the process's owner
19 $ ps A process is a running program Some are yours Most belong to the operating system (or other users) Use ps to get a list PID PPID PGID TTY UID STIME COMMAND con :19:07 /usr/bin/bash con :53:48 /usr/bin/ps $ The user ID of the process's owner Controls what the process can read, write, execute,
20 $ ps A process is a running program Some are yours Most belong to the operating system (or other users) Use ps to get a list PID PPID PGID TTY UID STIME COMMAND con :19:07 /usr/bin/bash con :53:48 /usr/bin/ps $ When the process was started
21 $ ps A process is a running program Some are yours Most belong to the operating system (or other users) Use ps to get a list PID PPID PGID TTY UID STIME COMMAND con :19:07 /usr/bin/bash con :53:48 /usr/bin/ps $ The program the process is executing
22 Can stop, pause, and resume running processes
23 Can stop, pause, and resume running processes $./analyze results*.dat
24 Can stop, pause, and resume running processes $./analyze results*.dat...a few minutes pass...
25 Can stop, pause, and resume running processes $./analyze results*.dat...a few minutes pass... ^C $
26 Can stop, pause, and resume running processes $./analyze results*.dat...a few minutes pass... ^C Stop the running program $
27 Can stop, pause, and resume running processes $./analyze results*.dat...a few minutes pass... ^C $./analyze results*.dat & $
28 Can stop, pause, and resume running processes $./analyze results*.dat...a few minutes pass... ^C $./analyze results*.dat & $ Run in the background
29 Can stop, pause, and resume running processes $./analyze results*.dat...a few minutes pass... ^C $./analyze results*.dat & $ Run in the background Shell returns right away instead of waiting for the program to finish
30 Can stop, pause, and resume running processes $./analyze results*.dat...a few minutes pass... ^C $./analyze results*.dat & $ fbcmd events $ Can run other programs in the foreground while waiting for background process(es) to finish
31 Can stop, pause, and resume running processes $./analyze results*.dat...a few minutes pass... ^C $./analyze results*.dat & $ fbcmd events $ jobs [1]./analyze results01.dat results02.dat results03.dat $
32 Can stop, pause, and resume running processes $./analyze results*.dat...a few minutes pass... ^C $./analyze results*.dat & $ fbcmd events $ jobs Show background processes [1]./analyze results01.dat results02.dat results03.dat $
33 Can stop, pause, and resume running processes $./analyze results*.dat...a few minutes pass... ^C $./analyze results*.dat & $ fbcmd events $ jobs [1]./analyze results01.dat results02.dat results03.dat $ fg
34 Can stop, pause, and resume running processes $./analyze results*.dat...a few minutes pass... ^C $./analyze results*.dat & $ fbcmd events $ jobs [1]./analyze results01.dat results02.dat results03.dat $ fg Bring background job to foreground
35 Can stop, pause, and resume running processes $./analyze results*.dat...a few minutes pass... ^C $./analyze results*.dat & $ fbcmd events $ jobs [1]./analyze results01.dat results02.dat results03.dat $ fg Bring background job to foreground Use fg %1, fg %2, etc. if there are several background jobs
36 Can stop, pause, and resume running processes $./analyze results*.dat...a few minutes pass... ^C $./analyze results*.dat & $ fbcmd events $ jobs [1]./analyze results01.dat results02.dat results03.dat $ fg...a few minutes pass... $ And finally it's done
37 Use ^Z to pause a program that's already running
38 Use ^Z to pause a program that's already running fg to resume it in the foreground
39 Use ^Z to pause a program that's already running fg to resume it in the foreground Or bg to resume it as a background job
40 Use ^Z to pause a program that's already running fg to resume it in the foreground Or bg to resume it as a background job $./analyze results01.dat
41 Use ^Z to pause a program that's already running fg to resume it in the foreground Or bg to resume it as a background job $./analyze results01.dat ^Z [1] Stopped./analyze results01.dat $
42 Use ^Z to pause a program that's already running fg to resume it in the foreground Or bg to resume it as a background job $./analyze results01.dat ^Z [1] Stopped./analyze results01.dat $ bg %1 $
43 Use ^Z to pause a program that's already running fg to resume it in the foreground Or bg to resume it as a background job $./analyze results01.dat ^Z [1] Stopped./analyze results01.dat $ bg %1 $ jobs [1]./analyze results01.dat $
44 Use ^Z to pause a program that's already running fg to resume it in the foreground Or bg to resume it as a background job $./analyze results01.dat ^Z [1] Stopped./analyze results01.dat $ bg %1 $ jobs [1]./analyze results01.dat $ kill %1 $
45 Job control mattered a lot when users only had one terminal window
46 Job control mattered a lot when users only had one terminal window Less important now: just open another window
47 Job control mattered a lot when users only had one terminal window Less important now: just open another window Still useful when running programs remotely
48 created by Greg Wilson August 2010 Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See for more information.
The Unix Shell. Job Control
The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. shell shell $
More informationThe Unix Shell. Pipes and Filters
The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. shell shell pwd
More informationThe Unix Shell. Permissions
The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. shell shell pwd,
More informationUnix Processes. What is a Process?
Unix Processes Process -- program in execution shell spawns a process for each command and terminates it when the command completes Many processes all multiplexed to a single processor (or a small number
More informationFile system Security (Access Rights)
File system Security (Access Rights) In your home directory, type % ls -l (l for long listing!) You will see that you now get lots of details about the contents of your directory, similar to the example
More information5/8/2012. Controlling User Processes Chapter 10
Controlling User Processes Chapter 10 To describe the concept of a process, and execution of multiple processes on a computer system with a single CPU To explain how a shell executes commands To discuss
More informationACS Unix (Winter Term, ) Page 92
ACS-294-001 Unix (Winter Term, 2016-2017) Page 92 The Idea of a Link When Unix creates a file, it does two things: 1. Set space on a disk to store data in the file. 2. Create a structure called an inode
More informationExploring UNIX: Session 5 (optional)
Exploring UNIX: Session 5 (optional) Job Control UNIX is a multi- tasking operating system, meaning you can be running many programs simultaneously. In this session we will discuss the UNIX commands for
More informationLinux Tutorial #6. -rw-r csce_user csce_user 20 Jan 4 09:15 list1.txt -rw-r csce_user csce_user 26 Jan 4 09:16 list2.
File system access rights Linux Tutorial #6 Linux provides file system security using a three- level system of access rights. These special codes control who can read/write/execute every file and directory
More informationUNIX Tutorial Five
UNIX Tutorial Five 5.1 File system security (access rights) In your unixstuff directory, type % ls -l (l for long listing!) You will see that you now get lots of details about the contents of your directory,
More informationPrograms. Program: Set of commands stored in a file Stored on disk Starting a program creates a process static Process: Program loaded in RAM dynamic
Programs Program: Set of commands stored in a file Stored on disk Starting a program creates a process static Process: Program loaded in RAM dynamic Types of Processes 1. User process: Process started
More informationSperimentazioni I LINUX commands tutorial - Part II
Sperimentazioni I LINUX commands tutorial - Part II A. Garfagnini, M. Mazzocco Università degli studi di Padova 24 Ottobre 2012 Streams and I/O Redirection Pipelines Create, monitor and kill processes
More informationMost of the work is done in the context of the process rather than handled separately by the kernel
Process Control Process Abstraction for a running program Manages program s use of memory, cpu time, and i/o resources Most of the work is done in the context of the process rather than handled separately
More informationBamuengine.com. Chapter 7. The Process
Chapter 7. The Process Introduction A process is an OS abstraction that enables us to look at files and programs as their time image. This chapter discusses processes, the mechanism of creating a process,
More informationAdvanced Unix Concepts. Satyajit Rai
Advanced Unix Concepts Advanced Unix Concepts Satyajit Rai March 17, 2003 March 22, 2003 KReSIT, IIT Bombay 1 Contents Contents Advanced Unix Concepts.......... 1 Contents.................. 2 Process Creation..............
More informationLecture 5: Jobs and Processes
Lecture 5: and CS2042 - UNIX Tools October 8, 2008 and Lecture Outline 1 2 Manipulating and Intro to Definition: A process is an instance of a running program. More specific than a program because it s
More informationAutomated Builds. Rules
Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. Manage tasks and dependencies
More informationWollongong of University School of Computer Science and Software Engineering. CSCI212/MCS9212 Interacting Systems Autumn 2015
Wollongong of University School of Computer Science and Software Engineering CSCI212/MCS9212 Interacting Systems Autumn 2015 Assignment 1 (7.5 marks) Due 11:59pm Monday March 22, 2015. Aim This assignment
More informationProcess Management forks, bombs, zombies, and daemons! Lecture 5, Hands-On Unix System Administration DeCal
Process Management forks, bombs, zombies, and daemons! Lecture 5, Hands-On Unix System Administration DeCal 2012-10-01 what is a process? an abstraction! you can think of it as a program in the midst of
More informationShells and Processes. Bryce Boe 2012/08/08 CS32, Summer 2012 B
Shells and Processes Bryce Boe 2012/08/08 CS32, Summer 2012 B Outline Opera>ng Systems and Linux Review Shells Project 1 Part 1 Overview Processes Overview for Monday (Sor>ng Presenta>ons) OS Review Opera>ng
More informationChapter 9: Process management. Chapter 9 Process management
Chapter 9: Process management Chapter 9 Process management Last revised: 19/7/2004 Chapter 9 Outline In this chapter we will learn about: Processes and process concepts Examining processes Adjusting process
More informationFile system links. Week Overview. Hard and symbolic links Process management
ULI101 Week 08 File system links Week Overview Hard and symbolic links Process management What is a file system Link? A link is a pointer to a file. This pointer associates a file name with a number called
More informationRemoving files and directories, finding files and directories, controlling programs
Removing files and directories, finding files and directories, controlling programs Laboratory of Genomics & Bioinformatics in Parasitology Department of Parasitology, ICB, USP Removing files Files can
More informationLinux System Administration
System Processes Objective At the conclusion of this module, the student will be able to: Describe and define a process Identify a process ID, the parent process and the child process Learn the PID for
More informationCSC209H Lecture 1. Dan Zingaro. January 7, 2015
CSC209H Lecture 1 Dan Zingaro January 7, 2015 Welcome! Welcome to CSC209 Comments or questions during class? Let me know! Topics: shell and Unix, pipes and filters, C programming, processes, system calls,
More informationSimplest version of DayOfYear
Reminder from last week: Simplest version of DayOfYear class DayOfYear { public: void output(); int month; int day; }; Like a struct with an added method All parts public Clients access month, day directly
More informationIntroduction 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 informationShells. A shell is a command line interpreter that is the interface between the user and the OS. The shell:
Shells A shell is a command line interpreter that is the interface between the user and the OS. The shell: analyzes each command determines what actions are to be performed performs the actions Example:
More informationStudy Guide Processes & Job Control
Study Guide Processes & Job Control Q1 - PID What does PID stand for? Q2 - Shell PID What shell command would I issue to display the PID of the shell I'm using? Q3 - Process vs. executable file Explain,
More informationMultitasking. In this chapter: Running a Command in the Backg round Checking on a Process Cancelling a Process
7 Multitasking In this chapter: Running a Command in the Backg round Checking on a Process Cancelling a Process Unix can do many jobs at once, dividing the processor s time between the tasks so quickly
More informationThe Unix Shell. Files and Directories
The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. Run Programs Store
More informationProcesses. System tasks Campus-Booster ID : **XXXXX. Copyright SUPINFO. All rights reserved
Processes System tasks Campus-Booster ID : **XXXXX www.supinfo.com Copyright SUPINFO. All rights reserved Processes Your trainer Presenter s Name Title: **Enter title or job role. Accomplishments: **What
More informationIntroduction to UNIX Shell Exercises
Introduction to UNIX Shell Exercises Determining Your Shell Open a new window or use an existing window for this exercise. Observe your shell prompt - is it a $ or %? What does this tell you? Find out
More informationComputer 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 informationHW 1: Shell. Contents CS 162. Due: September 18, Getting started 2. 2 Add support for cd and pwd 2. 3 Program execution 2. 4 Path resolution 3
CS 162 Due: September 18, 2017 Contents 1 Getting started 2 2 Add support for cd and pwd 2 3 Program execution 2 4 Path resolution 3 5 Input/Output Redirection 3 6 Signal Handling and Terminal Control
More informationOperating 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 informationI/O and Shell Scripting
I/O and Shell Scripting File Descriptors Redirecting Standard Error Shell Scripts Making a Shell Script Executable Specifying Which Shell Will Run a Script Comments in Shell Scripts File Descriptors Resources
More informationENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS
SOLUTIONS ENGR 3950U / CSCI 3020U (Operating Systems) Midterm Exam October 23, 2012, Duration: 80 Minutes (10 pages, 12 questions, 100 Marks) Instructor: Dr. Kamran Sartipi Question 1 (Computer Systgem)
More informationHow to Implement a Web-based Terminal with Docker
How to Implement a Web-based Terminal with Docker 2015-03-14 Who am I 杜万 (Vangie Du) Full-Stack Web Developer Linux fans Working on Coding@Shanghai About Coding Project Management Source Code Management
More informationBinghamton University. CS-220 Spring Sharing Resources. Computer Systems Chapter 8.2, 8.4
Sharing Resources Computer Systems Chapter 8.2, 8.4 Abstract View When I run my program, it has access to the entire computer, including the processor, memory, keyboard, display, disk drives, network connections,
More informationSome useful UNIX Commands written down by Razor for newbies to get a start in UNIX
Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX 15th Jan. 2000 / 3:55 am Part 1: Working with files and rights ------------------------------------- cp
More informationM2PGER FORTRAN programming. General introduction. Virginie DURAND and Jean VIRIEUX 10/13/2013 M2PGER - ALGORITHME SCIENTIFIQUE
M2PGER 2013-2014 FORTRAN programming General introduction Virginie DURAND and Jean VIRIEUX 1 Why learning programming??? 2 Why learning programming??? ACQUISITION numerical Recording on magnetic supports
More informationIntroduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen
Introduction to Unix The Windows User perspective Wes Frisby Kyle Horne Todd Johansen What is Unix? Portable, multi-tasking, and multi-user operating system Software development environment Hardware independent
More informationbash, part 3 Chris GauthierDickey
bash, part 3 Chris GauthierDickey More redirection As you know, by default we have 3 standard streams: input, output, error How do we redirect more than one stream? This requires an introduction to file
More information9 Notes on selecting processes in proc.mem and proc.num items
208/07/04 3:26 /5 9 Notes on selecting processes in proc.mem and proc.num items 9 Notes on selecting processes in proc.mem and proc.num items Processes modifying their commandline Some programs use modifying
More informationCRUK cluster practical sessions (SLURM) Part I processes & scripts
CRUK cluster practical sessions (SLURM) Part I processes & scripts login Log in to the head node, clust1-headnode, using ssh and your usual user name & password. SSH Secure Shell 3.2.9 (Build 283) Copyright
More informationCSC UNIX System, Spring 2015
CSC 352 - UNIX System, Spring 2015 Study guide for the CSC352 midterm exam (20% of grade). Dr. Dale E. Parson, http://faculty.kutztown.edu/parson We will have a midterm on March 19 on material we have
More informationLecture 24: Multitasking and Signals
CSCI-UA.0201-003 Computer Systems Organization Lecture 24: Multitasking and Signals Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com Some slides adapted (and slightly modified) from: Clark
More informationSystems Programming/ C and UNIX
Systems Programming/ C and UNIX Alice E. Fischer November 22, 2013 Alice E. Fischer () Systems Programming Lecture 12... 1/27 November 22, 2013 1 / 27 Outline 1 Jobs and Job Control 2 Shared Memory Concepts
More informationSystem Programming. Signals II
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 Suspending a process 2
More informationCPSC 341 OS & Networks. Processes. Dr. Yingwu Zhu
CPSC 341 OS & Networks Processes Dr. Yingwu Zhu Process Concept Process a program in execution What is not a process? -- program on a disk A process is an active object, but a program is just a file It
More informationComputer Systems and Architecture
Computer Systems and Architecture Stephen Pauwels Computer Systems Academic Year 2018-2019 Overview of the Semester UNIX Introductie Regular Expressions Scripting Data Representation Integers, Fixed point,
More informationS E C T I O N O V E R V I E W
INPUT, OUTPUT REDIRECTION, PIPING AND PROCESS CONTROL S E C T I O N O V E R V I E W In this section, we will learn about: input redirection; output redirection; piping; process control; 5.1 INPUT AND OUTPUT
More informationManaging Processes Process: A running program
Managing Processes Process: A running program User Process: The process initiated by a User while logged into a terminal (e.g. grep, find, ls) Daemon Process: These processes are usually initiated on system
More informationelinks, mail processes nice ps, pstree, top job control, jobs, fg, bg signals, kill, killall crontab, anacron, at
Processes 1 elinks, mail processes nice ps, pstree, top job control, jobs, fg, bg signals, kill, killall crontab, anacron, at 2 elinks is a text-based (character mode) web browser we will use it to enable
More informationLab 2: Linux/Unix shell
Lab 2: Linux/Unix shell Comp Sci 1585 Data Structures Lab: Tools for Computer Scientists Outline 1 2 3 4 5 6 7 What is a shell? What is a shell? login is a program that logs users in to a computer. When
More informationCS Unix Tools. Fall 2010 Lecture 10. Hussam Abu-Libdeh based on slides by David Slater. September 29th, 2010
Fall 2010 Lecture 10 Hussam Abu-Libdeh based on slides by David Slater September 29th, 2010 Vim = Awesome! Vim is a powerful lightweight text editor. The name Vim is an acronym for Vi IMproved vi is an
More informationCMU MSP 36602: Intro to UNIX and Scripting: Part 1
CMU MSP 36602: Intro to UNIX and Scripting: Part 1 H. Seltman March 28, 2018 I. Overview a. UNIX is an operating system which is a competitor to and partial ancestor of MS-DOS, MS-Windows, and Mac OSX.
More informationHigh Performance Computing Lecture 11. Matthew Jacob Indian Institute of Science
High Performance Computing Lecture 11 Matthew Jacob Indian Institute of Science Agenda 1. Program execution: Compilation, Object files, Function call and return, Address space, Data & its representation
More informationProcesses & Signals. System Runs Many Processes Concurrently. State consists of memory image + register values + program counter
Processes & Signals Topics Process Hierarchy Shells Signals The World of Multitasking System Runs Many Processes Concurrently Process: executing program State consists of memory image + register values
More informationLinux Command Line Interface. December 27, 2017
Linux Command Line Interface December 27, 2017 Foreword It is supposed to be a refresher (?!) If you are familiar with UNIX/Linux/MacOS X CLI, this is going to be boring... I will not talk about editors
More informationExceptional Control Flow Part II Nov. 2, 2009"
Exceptional Control Flow Part II Nov. 2, 2009" Unix Startup: Step 2" [0] /etc/inittab Daemons" e.g. ftpd, httpd" init [1] getty init forks and execs daemons per /etc/ inittab, and forks and execs a getty
More informationCSE 390a Lecture 2. Exploring Shell Commands, Streams, Redirection, and Processes
CSE 390a Lecture 2 Exploring Shell Commands, Streams, Redirection, and Processes slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson http://www.cs.washington.edu/390a/ 1 2 Lecture
More informationelinks, mail processes nice ps, pstree, top job control, jobs, fg, bg signals, kill, killall crontab, anacron, at
Processes 1 elinks, mail processes nice ps, pstree, top job control, jobs, fg, bg signals, kill, killall crontab, anacron, at 2 elinks is a text-based (character mode) web browser we will use it to enable
More information07 - Processes and Jobs
07 - Processes and Jobs CS 2043: Unix Tools and Scripting, Spring 2016 [1] Stephen McDowell February 10th, 2016 Cornell University Table of contents 1. Processes Overview 2. Modifying Processes 3. Jobs
More informationUnix Basics. Systems Programming Concepts
Concepts Unix directories Important Unix file commands man, pwd, ls, mkdir, cd, cp, mv File and directory access rights through permission settings Using chmod to change permissions Other important Unix
More informationUNIX Command Cheat Sheets
UNIX Command Cheat Sheets date Writes the current date to the screen date Mon Nov 20 18:25:37 EST 2000 sort infile Sorts the contents of the input file in alphabetical order sort names Sorts the contents
More informationChap2: Operating-System Structures
Chap2: Operating-System Structures Objectives: services OS provides to users, processes, and other systems structuring an operating system how operating systems are designed and customized and how they
More informationFile permission u owner of file/directory (user) g group of the file/directory o other a all
File permission u owner of file/directory (user) g group of the file/directory o other a all Permission Types: permission octal value Meaning Read (r) 4 The file can is read only, for directory it's contain
More informationSets and Dictionaries
Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. Let's try an experiment Let's
More informationUNIX Command Cheat Sheets
UNIX Command Cheat Sheets date Writes the current date to the date Mon Nov 20 18:25:37 EST 2000 sort infile Sorts the contents of the input file in alphabetical order sort names Sorts the contents of names
More informationSignals: Management and Implementation. Sanjiv K. Bhatia Univ. of Missouri St. Louis
Signals: Management and Implementation Sanjiv K. Bhatia Univ. of Missouri St. Louis sanjiv@aryabhat.umsl.edu http://www.cs.umsl.edu/~sanjiv Signals Mechanism to notify processes of asynchronous events
More informationUser Commands ps ( 1 )
NAME ps report process status SYNOPSIS ps [-aacdefjllpy] [-g grplist] [-n namelist] [-o format]... [-p proclist] [-s sidlist] [-t term] [-u uidlist] [-U uidlist] [-G gidlist] DESCRIPTION The ps command
More informationIntroduction 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 informationAdvanced Bash Scripting
for HPC SysAdmins Piero Calucci 1 2 1 Scuola Internazionale Superiore di Studi Avanzati Trieste 2 Democritos Modeling Center for Research in Atomistic Simulation INFM November 2008 Advanced School in High
More informationCSE 390a Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/390a/
More informationIC221: Systems Programming 12-Week Written Exam [SOLUTIONS]
IC221: Systems Programming 12-Week Written Exam [SOLUTIONS] April 2, 2014 Answer the questions in the spaces provided on the question sheets. If you run out of room for an answer, continue on the back
More informationCS Operating Systems Lab 3: UNIX Processes
CS 346 - Operating Systems Lab 3: UNIX Processes Due: February 15 Purpose: In this lab you will become familiar with UNIX processes. In particular you will examine processes with the ps command and terminate
More informationEach terminal window has a process group associated with it this defines the current foreground process group. Keyboard-generated signals are sent to
Each terminal window has a process group associated with it this defines the current foreground process group. Keyboard-generated signals are sent to all processes in the current window s process group.
More informationAdvanced Unix/Linux System Program. Instructor: William W.Y. Hsu
Advanced Unix/Linux System Program Instructor: William W.Y. Hsu CONTENTS Process Groups Sessions Signals 5/10/2018 INTRODUCTION TO COMPETITIVE PROGRAMMING 2 Login process 5/10/2018 ADVANCED UNIX/LINUX
More informationProcesses. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
Processes Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu OS Internals User space shell ls trap shell ps Kernel space File System Management I/O
More informationGetting started with Hugs on Linux
Getting started with Hugs on Linux COM1022 Functional Programming Techniques Dr Hans Georg Schaathun University of Surrey Autumn 2009 Week 7 Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn
More informationOperating Systems and Protection CS 217
Operating Systems and Protection CS 7 Goals of Today s Lecture How multiple programs can run at once o es o Context switching o control block o Virtual Boundary between parts of the system o User programs
More informationCS631 - Advanced Programming in the UNIX Environment. Process Groups, Sessions, Signals
CS631 - Advanced Programming in the UNIX Environment Slide 1 CS631 - Advanced Programming in the UNIX Environment Process Groups, Sessions, Signals Department of Computer Science Stevens Institute of Technology
More informationAutomated Builds. Macros
Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. Manage tasks and dependencies
More informationIntroduction 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 informationAdvanced UNIX. 2. The Shell (Ch.5, Sobell) Objectives. to supplement the Introduction to UNIX slides with extra information about the Shell
Advanced UNIX CIS 218 Advanced UNIX 2. The Shell (Ch.5, Sobell) Objectives to supplement the Introduction to UNIX slides with extra information about the Shell CIS 218 Advanced UNIX 1 Overview 1. Redirection
More informationShell and Signals. Computer Organization 3/17/2015. CSC252 - Spring The World of Multiprogramming or Multitasking. Unix Process Hierarchy
Shell and Signals Kai Shen The World of Multiprogramming or Multitasking System runs many processes concurrently Process: executing program State includes memory image + register values + program counter
More informationIntroduction to UNIX/Linux
Introduction to UNIX/Linux Biochemistry Boot Camp 2018 Session #3 Nick Fitzkee nfitzkee@chemistry.msstate.edu Operating system (OS) Some terms Command-line interface (CLI) Graphical user interface (GUI)
More informationINSE Lab 1 Introduction to UNIX Fall 2017
INSE 6130 - Lab 1 Introduction to UNIX Fall 2017 Updated by: Paria Shirani Overview In this lab session, students will learn the basics of UNIX /Linux commands. They will be able to perform the basic operations:
More informationClasses and Objects. Inheritance
Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. Interpolating time series signals
More informationMultitasking. Programmer s model of multitasking. fork() spawns new process. exit() terminates own process
Signals Prof. Jin-Soo Kim( jinsookim@skku.edu) TA JinHong Kim( jinhong.kim@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Multitasking Programmer s model of multitasking
More informationExceptions, Processes and Signals
Exceptions, Processes and Signals Computer Systems Organization (Spring 2017) CSCI-UA 201, Section 3 Shells See https://en.wikipedia.org/wiki/shell_(computing) Instructor: Joanna Klukowska Slides adapted
More informationConfiguring the Router ASCII Interface
Configuring the Router ASCII Interface The router is controlled via an ASCII interface. This interface is accessible via a serial RS-232 port or over the network via a TCP port. Both ports use the same
More informationProcesses in linux. What s s a process? process? A dynamically executing instance of a program. David Morgan. David Morgan
Processes in linux David Morgan What s s a process? process? A dynamically executing instance of a program 1 Constituents of a process its code data various attributes OS needs to manage it OS keeps track
More informationWhat is the Shell. Whenever you login to a Unix system you are placed in a program called the shell. All of your work is done within the shell.
What is the Shell Whenever you login to a Unix system you are placed in a program called the shell. All of your work is done within the shell. The shell is your interface to the operating system. It acts
More informationPart 1: Basic Commands/U3li3es
Final Exam Part 1: Basic Commands/U3li3es May 17 th 3:00~4:00pm S-3-143 Same types of questions as in mid-term 1 2 ls, cat, echo ls -l e.g., regular file or directory, permissions, file size ls -a cat
More informationThe UNIX Shells. Computer Center, CS, NCTU. How shell works. Unix shells. Fetch command Analyze Execute
Shells The UNIX Shells How shell works Fetch command Analyze Execute Unix shells Shell Originator System Name Prompt Bourne Shell S. R. Bourne /bin/sh $ Csh Bill Joy /bin/csh % Tcsh Ken Greer /bin/tcsh
More informationGetting started with Hugs on Linux
Getting started with Hugs on Linux CS190 Functional Programming Techniques Dr Hans Georg Schaathun University of Surrey Autumn 2008 Week 1 Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn
More informationacmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;
Note: you can find this file under: http://www.cs.queensu.ca/ acmteam/unix.pdf Introduction to Unix Tutorial In this tutorial, you will learn: How to manage your account (user ID, password, shell); Navigating
More information