Introduction to UNIX Shell Exercises
|
|
- David Singleton
- 5 years ago
- Views:
Transcription
1 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 which shell you are using with the command: echo $SHELL Find out which shells are available on your system: which csh which tcsh which ksh which bh which bash Try invoking other shells and notice how the prompt changes. Then list your processes to see them sh csh ksh bash ps Return to your original shell by ing consecutively from each of the shells you started above. List your processes to verify that you have only your original (tcsh) shell running: ps 7. Change to csh for the rest of this exercise tcsh 8. Set up a history for later on set history = 150 1
2 Processes Review the man page for the ps command man ps Try using the ps command to list your processes. Then try to list other processes on the system. For example: ps ps uc ps ug ps aux Review the man page for the kill command man kill Start a process which does nothing except sleep for 5000 seconds sleep 5000 Now try issuing some other commands, for example ls. What happens? Why won't the shell accept any commands? To kill a process which is running in the foreground, CTRL-C can usually be used. Kill the sleep 5000 process you just started in this manner. What happens after you kill the process? Try another UNIX command, such as ls. Does it work now? Start another sleep 5000 process, except this time, start it in the background: sleep 5000 & Now try issuing some other commands, for example ls. What happens? 7. Use the jobs command to find out about jobs you have running in the background. What does the output of the jobs command tell you? Start a couple more sleep 5000 processes in the background and then use the jobs command again. Do they all appear? Bring the third sleep process into the foreground with the command fg %3 What happens? Can you run anything else now? Why? Suspend the foreground sleep process with the CTRL-Z command. What happens? Try the jobs command now. What does it show? A suspended process can be put in either the background or foreground. Use the bg %3 2
3 command to resume running the third sleep process in the background. 1 1 The kill command can be used in various ways. Kill the third sleep process with the command kill %3 and then use the jobs command to check on it. What do you see? Now use the ps command to view your processes. Do you see the remaining two sleep processes? Notice their PIDs and then use the kill command to kill both of them. For example: % ps PID TTY TIME CMD pts/0 0:00 sleep pts/0 0:00 sleep pts/0 0:00 -tcsh pts/0 0:00 ps % kill % ps PID TTY TIME CMD pts/0 0:00 ps pts/0 0:00 -tcsh [3] + Terminated sleep 1000 [2] + Terminated sleep 1000 Redirection Redirect the output of the man command into a file instead of to your screen with the command: man cp > cp.manpage List your directory to confirm that the command worked. View the file with the more cp.manpage command also. Redirect the output of the ls -l command to a file and then view the file after the command completes: ls -l ~/* > homedir.files Redirect both the stdout and stderr from a command to a file. For example, type the command ls * nosuchfile and notice that both the command output and an error message are displayed on your screen. Then, type the command below to redirect both to a file. View the file after the command completes. ls * nosuchfile >& ls.out-err Redirection will overwrite existing files. To prove it, try the following sequence of commands: echo 'one' > file1 echo 'two' > file1 3
4 You can append redirected output to an existing file if you use >> instead of >. Try to commands below to prove it: echo 'one' > file1 echo 'two' >> file1 Pipes and Filters Obtain a sorted list of users on the system by piping the output of the who command to the input of the sort command: who sort View all system processes one screen at a time by piping the output of the ps aux command to the input of the more command: ps aux more View all $USER processes one screen at a time by piping the output of the ps aux command to the input of the grep command: ps aux grep $USER View all root processes one screen at a time by piping the output of three different commands together. Note that in this example, the grep command is acting as a filter: ps aux grep root more Features (csh) Command History: At the start you invoked the TC Shell's command history feature. To view your command history simply type the command history. What do you see? You may wish to view your command history in reverse chronological order (most recent commands at beginning of list), one screen at a time: history -r more Tcsh allows you to "cycle through" your command history by using the up arrow key. Try pressing your up arrow key at the Shell prompt. Try it several times. Your previous commands should appear, allowing you to edit them and/or press return to reexecute them. Event Reexecution: Try reexecuting several events from your history list. An example is 4
5 shown below - note that your actual command history will differ: % history -r more 36 12:34 cat sorted.list 35 12:34 sort < unsorted > sorted.list 34 12:34 ls -l > unsorted 33 12:32 sort < ls * > sorted.list 32 12:23 ps ug grep studnt 31 12:22 ps ug grep root more 30 12:20 ps ug more 29 12:18 ps aux 28 12:16 ls %!36 Now try reexecuting an event by using the!string method. For example, the command!his will reexecute the last command you issued which began with the string "his" (such as a history command). Finally, try reexcuting a previous command by typing!! Modifying Previous Events: Type history -r > unsorted. Then, type a command with an obvious typo: sort unsrted grep Systems After the shell tells you it can't open the file "unsrted", modify the command as shown below. The command should now work. ^srt^sort Using the Tcsh, you could also accomplish this by recalling the command with the up arrow key and then editing the command line. Using Aliases: Create a few aliases and then use them: alias h "history -r more" h alias ll "ls -l" ll alias rm "rm -i" rm unsorted Issue the alias command without any arguments. It should show you all of your defined aliases. 7. Filename Generation: You have been using this feature all along. For example: ls /Applications/* ls /Applications/i* ls /Applications/[NS]* You can turn off filename generation with the command set noglob. Do this and then try the same commands above. When you're convinced that it is turned off, turn it back on again with the command unset noglob. 5
6 8. Filename Completion: Turn on this feature with the command set filec. Then, create a file with a long name: touch Introduction.UNIX.Filesystems Now, type the following and notice what happens. Note that you should use the actual Tab key instead of the literal words "Tab key". Also note that some systems use the Esc key instead of the Tab key. ls IntTab key Variables Display your shell's variables with the set command. Review the list. Then, use the echo command to display a few of them individually. For example: echo $user echo $home echo $term The PATH(path) variable is a very important variable. It determines the directory paths which the shell will search when looking for an executable. Find out what your path is: echo $path echo $path fold - use this if it "runs off" the right hand side of the screen Display your shell's environment variables with the setenv command. Review the list. Then, use the echo command to display a few of them individually. For example: echo $HOST echo $MANPATH echo $HOME Try using variables with UNIX commands. For example: ls -l $HOME echo My userid is $user and my machine is $HOST Set a few variables of your own creation and then display/use them. For example: set myvar1 = "this is a string variable" echo $myvar1 setenv dir1 /usr/local/bin ls $dir1 set colors=(red green blue) 6
7 echo $colors[1] echo $colors[2] echo $colors[3] echo num1 = num2 = num3 = ($num1 + $num2) echo $num3 Unset any of the variables you previously set and then try to display them. What happens? For example: unset colors echo $colors unsetenv dir1 echo $dir1 Initialization Files Change to your home directory and list all of your files including your hidden files. Which initialization files mentioned in the tutorial do you see? cd ls -a Use either vi or pico to edit your.cshrc file. Notice the variables and aliases which have already been set for you. Customize the file, perhaps creating some variables or aliases of your own. You may get an idea or two from the example.cshrc file in the tutorial. Use the command source.cshrc to effect the changes you made. Try them out...do they work? 7
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.
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 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 informationIntroduction to Linux
Introduction to Linux January 2011 Don Bahls User Consultant (Group Leader) bahls@arsc.edu (907) 450-8674 Overview The shell Common Commands File System Organization Permissions Environment Variables I/O
More information5/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 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 informationIntroduction to Linux Organizing Files
Introduction to Linux Organizing Files Computational Science and Engineering North Carolina A&T State University Instructor: Dr. K. M. Flurchick Email: kmflurch@ncat.edu Arranging, Organizing, Packing
More informationCST 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 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 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 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 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 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 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 information5/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 informationIntroduction 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 informationS 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 informationStandard. 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 informationIntroduction to the Linux Command Line January Presentation Topics
1/22/13 Introduction to the Linux Command Line January 2013 Presented by Oralee Nudson ARSC User Consultant & Student Supervisor onudson@alaska.edu Presentation Topics Information Assurance and Security
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 informationIntroduction: 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 informationShells and Shell Programming
Shells and Shell Programming 1 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
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 informationCrash Course in Unix. For more info check out the Unix man pages -orhttp://www.cs.rpi.edu/~hollingd/unix. -or- Unix in a Nutshell (an O Reilly book).
Crash Course in Unix For more info check out the Unix man pages -orhttp://www.cs.rpi.edu/~hollingd/unix -or- Unix in a Nutshell (an O Reilly book). 1 Unix Accounts To access a Unix system you need to have
More informationReview 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 informationUNIX 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 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 informationcommands exercises Linux System Administration and IP Services AfNOG 2015 Linux Commands # Notes
Linux System Administration and IP Services AfNOG 2015 Linux Commands # Notes * Commands preceded with "$" imply that you should execute the command as a general user not as root. * Commands preceded with
More informationUsing 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 informationunix intro Documentation
unix intro Documentation Release 1 Scott Wales February 21, 2013 CONTENTS 1 Logging On 2 1.1 Users & Groups............................................. 2 1.2 Getting Help...............................................
More informationUNIX 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 informationCommand-line interpreters
Command-line interpreters shell Wiki: A command-line interface (CLI) is a means of interaction with a computer program where the user (or client) issues commands to the program in the form of successive
More informationThe Unix Shell & Shell Scripts
The Unix Shell & Shell Scripts You should do steps 1 to 7 before going to the lab. Use the Linux system you installed in the previous lab. In the lab do step 8, the TA may give you additional exercises
More informationShells and Shell Programming
Shells and Shell Programming 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
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 informationMills HPC Tutorial Series. Linux Basics I
Mills HPC Tutorial Series Linux Basics I Objectives Command Line Window Anatomy Command Structure Command Examples Help Files and Directories Permissions Wildcards and Home (~) Redirection and Pipe Create
More informationAssignment 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 informationProcesses. Shell Commands. a Command Line Interface accepts typed (textual) inputs and provides textual outputs. Synonyms:
Processes The Operating System, Shells, and Python Shell Commands a Command Line Interface accepts typed (textual) inputs and provides textual outputs. Synonyms: - Command prompt - Shell - CLI Shell commands
More informationLecture-4. Introduction to Unix: More Commands, Boot-up Actions and X Window
Lecture-4 Introduction to Unix: More Commands, Boot-up Actions and X Window What You Will Learn We continue to give more information about the fundamental commands of the Unix operating system. We also
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 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 informationReview 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 informationUnix/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 informationCSE 391 Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors
CSE 391 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/391/
More informationShell. SSE2034: System Software Experiment 3, Fall 2018, Jinkyu Jeong
Shell Prof. Jinkyu Jeong (Jinkyu@skku.edu) TA -- Minwoo Ahn (minwoo.ahn@csl.skku.edu) TA -- Donghyun Kim (donghyun.kim@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu
More informationUnix tutorial. Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based.
Unix tutorial Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based. Terminal windows You will use terminal windows to enter and execute
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 informationUseful Unix Commands Cheat Sheet
Useful Unix Commands Cheat Sheet The Chinese University of Hong Kong SIGSC Training (Fall 2016) FILE AND DIRECTORY pwd Return path to current directory. ls List directories and files here. ls dir List
More informationSelf-test Linux/UNIX fundamentals
Self-test Linux/UNIX fundamentals Document: e0829test.fm 16 January 2018 ABIS Training & Consulting Diestsevest 32 / 4b B-3000 Leuven Belgium TRAINING & CONSULTING INTRODUCTION TO THE SELF-TEST LINUX/UNIX
More informationThe 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 informationIntroduction 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 information3/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 informationReview 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 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 informationACS Unix (Winter Term, ) Page 21
ACS-294-001 Unix (Winter Term, 2016-2017) Page 21 The Shell From the beginning, Unix was designed so that the shell is an actual program separated from the main part of the operating system. What is a
More informationBashed One Too Many Times. Features of the Bash Shell St. Louis Unix Users Group Jeff Muse, Jan 14, 2009
Bashed One Too Many Times Features of the Bash Shell St. Louis Unix Users Group Jeff Muse, Jan 14, 2009 What is a Shell? The shell interprets commands and executes them It provides you with an environment
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 5 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 User Operating System Interface - CLI CLI
More informationPerl 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 informationUnix Tutorial Haverford Astronomy 2014/2015
Unix Tutorial Haverford Astronomy 2014/2015 Overview of Haverford astronomy computing resources This tutorial is intended for use on computers running the Linux operating system, including those in the
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 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 informationAppendix 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 informationIntroduction To. Barry Grant
Introduction To Barry Grant bjgrant@umich.edu http://thegrantlab.org Working with Unix How do we actually use Unix? Inspecting text files less - visualize a text file: use arrow keys page down/page up
More informationSystem 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 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 information27-Sep CSCI 2132 Software Development Lab 4: Exploring bash and C Compilation. Faculty of Computer Science, Dalhousie University
Lecture 4 p.1 Faculty of Computer Science, Dalhousie University CSCI 2132 Software Development Lab 4: Exploring bash and C Compilation 27-Sep-2017 Location: Goldberg CS Building Time: Wednesday, 16:05
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 informationProcesses and Shells
Shell ls pico httpd CPU Kernel Disk NIC Processes Processes are tasks run by you or the OS. Processes can be: shells commands programs daemons scripts Shells Processes operate in the context of a shell.
More informationCS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 2
CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 2 Prof. Michael J. Reale Fall 2014 COMMAND KATA 7: VARIABLES Command Kata 7: Preparation First, go to ~/cs307 cd ~/cs307 Make directory dkata7 and go
More informationTable 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 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 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 informationSystem Administration
Süsteemihaldus MTAT.08.021 System Administration UNIX shell basics Name service DNS 1/69 Command Line Read detailed manual for specific command using UNIX online documentation or so called manual (man)
More informationIntroduction to UNIX. Introduction EECS l UNIX is an operating system (OS). l Our goals:
Introduction to UNIX EECS 2031 13 November 2017 Introduction l UNIX is an operating system (OS). l Our goals: Learn how to use UNIX OS. Use UNIX tools for developing programs/ software, specifically shell
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 informationEECS2301. 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 informationEnvironment Variables
Environment Variables 1 A shell is simply a program that supplies certain services to users. As such, a shell may take parameters whose values modify or define certain behaviors. These parameters (or shell
More information5/8/2012. Exploring Utilities Chapter 5
Exploring Utilities Chapter 5 Examining the contents of files. Working with the cut and paste feature. Formatting output with the column utility. Searching for lines containing a target string with grep.
More informationChapter-3. Introduction to Unix: Fundamental Commands
Chapter-3 Introduction to Unix: Fundamental Commands What You Will Learn The fundamental commands of the Unix operating system. Everything told for Unix here is applicable to the Linux operating system
More informationSub-Topic 1: Quoting. Topic 2: More Shell Skills. Sub-Topic 2: Shell Variables. Referring to Shell Variables: More
Topic 2: More Shell Skills Plan: about 3 lectures on this topic Sub-topics: 1 quoting 2 shell variables 3 sub-shells 4 simple shell scripts (no ifs or loops yet) 5 bash initialization files 6 I/O redirection
More informationLinux Command Line Primer. By: Scott Marshall
Linux Command Line Primer By: Scott Marshall Draft: 10/21/2007 Table of Contents Topic Page(s) Preface 1 General Filesystem Background Information 2 General Filesystem Commands 2 Working with Files and
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 informationUsing UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program
Using UNIX. UNIX is mainly a command line interface. This means that you write the commands you want executed. In the beginning that will seem inferior to windows point-and-click, but in the long run the
More informationCS 307: UNIX PROGRAMMING ENVIRONMENT REVIEW FOR EXAM 2
CS 307: UNIX PROGRAMMING ENVIRONMENT REVIEW FOR EXAM 2 Prof. Michael J. Reale Fall 2014 EXAM 2 OVERVIEW Exam 2 Material Exam 2 will cover the following: REVIEW slides from (8) to (17) (INCLUSIVE) THIS
More informationUNIX Quick Reference
UNIX Quick Reference Charles Duan FAS Computer Services August 26, 2002 1 Command Reference Many of these commands have many more options than the ones displayed here. Most also take the option h or help,
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 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 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 informationFirst of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.
Warnings 1 First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Read the relevant material in Sobell! If
More informationLinux shell scripting Getting started *
Linux shell scripting Getting started * David Morgan *based on chapter by the same name in Classic Shell Scripting by Robbins and Beebe What s s a script? text file containing commands executed as a unit
More informationCommand Line Interface The basics
Command Line Interface The basics Marco Berghoff, SCC, KIT Steinbuch Centre for Computing (SCC) Funding: www.bwhpc-c5.de Motivation In the Beginning was the Command Line by Neal Stephenson In contrast
More informationCSCI 2132 Software Development. Lecture 3: Unix Shells and Other Basic Concepts
CSCI 2132 Software Development Lecture 3: Unix Shells and Other Basic Concepts Instructor: Vlado Keselj Faculty of Computer Science Dalhousie University 10-Sep-2018 (3) CSCI 2132 1 Introduction to UNIX
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 informationChapter 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 informationUnix Shells and Other Basic Concepts
CSCI 2132: Software Development Unix Shells and Other Basic Concepts Norbert Zeh Faculty of Computer Science Dalhousie University Winter 2019 Shells Shell = program used by the user to interact with the
More informationUNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29
UNIX The Very 10 Short Howto for beginners Soon-Hyung Yook March 27, 2015 Soon-Hyung Yook UNIX March 27, 2015 1 / 29 Table of Contents 1 History of Unix 2 What is UNIX? 3 What is Linux? 4 How does Unix
More informationMills HPC Tutorial Series. Linux Basics II
Mills HPC Tutorial Series Linux Basics II Objectives Bash Shell Script Basics Script Project This project is based on using the Gnuplot program which reads a command file, a data file and writes an image
More informationLab Week02 - Part I. Shell Commands. Professional Training Academy Linux Series
Lab Week02 - Part I Shell Commands Professional Training Academy Linux Series Commands: Manipulation cp : copy a file To copy a file you need to give a source and then a destination e.g. to copy the file
More informationUNIX Shell Programming
$!... 5:13 $$ and $!... 5:13.profile File... 7:4 /etc/bashrc... 10:13 /etc/profile... 10:12 /etc/profile File... 7:5 ~/.bash_login... 10:15 ~/.bash_logout... 10:18 ~/.bash_profile... 10:14 ~/.bashrc...
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 shell scripting
UNIX shell scripting EECS 2031 Summer 2014 Przemyslaw Pawluk June 17, 2014 What we will discuss today Introduction Control Structures User Input Homework Table of Contents Introduction Control Structures
More information