CS252 Introduction to Unix for Programmers April 24, 2020 CS252 Outline Spring 2020 1 Preamble Syllabus Policies Library Library Below are the modules that comprise the course content. Each module includes a mixture of lecture notes for you to read (required) and relevant textbook chapters (optional). Many of the lecture notes include “Try This” activities for you to perform while logged in to one of our Linux servers. Most modules include at least one assignment that you should attempt to complete before moving on. KEYS TO SUCCESS IN THIS COURSE: 1. READ THE SYLLABUS The syllabus lays out the basic course policies. It tells you what you need to do to earn a passing grade. It tells you when you need to have done that by. It tells you how to get in touch with me if you run into problems. 2. HAVE A SCHEDULE You have the freedom to schedule your own time in this course, but you DO need to set up a schedule. Don’t forget that this course exists and that you are registered for it. Don’t think you can repeatedly set it aside for weeks at a time and make up the time later. There are 14 assignments in the course. There are approximately 14 weeks in a Fall or Spring semester (12 in summer). You can easily figure out what kind of pace you should be setting if you want to complete this course. 3. IF YOU DON"T UNDERSTAND SOMETHING, ASK QUESTIONS In a web course, my role as Instructor changes from “lecturer” to “tutor”. You can ask questions in the course Forums. You can send me email. You can also contact me during office hours. You’ll find more information on these options in the syllabus and other documents on the Course Policies page. Some people are too shy to ask questions. Some are too proud to ask questions. My advice to both groups is to get over it! Part of being educated is knowing how to exploit your available information resources. In this course, I am one of those resources. 4. READ THE LECTURE NOTES. DO THE “TRY THIS” EXERCISES. As a general rule, everything you need to complete the assignments and final exam are contained in the lecture notes and are things that you will practice with in the “Try This” exercises. The listed textbook readings are optional. Hunting the internet for additional info is possible, but can often lead to more confusion than enlightenment, so you do that at your own risk. When you read, read attentively. When you do the Try This exercises, be observant to the results you are getting and make sure that you understand them. If you consistently find yourself starting the assignments thinking that you are prepared, then get stuck with no idea how to proceed, that’s a good sign that you were not really giving the lecture notes or Try This exercises enough attention. 1 Getting Started Objectives Upon completing this section, a student should… Be familiar with the course layout and policies. Understand the differences between local and remote command sessions text-mode and graphics mode sessions Have set up a CS network account. Be able to log in to a remote text-mode session on the CS Dept Linux machines. 1. Read: Welcome to CS 252 2. Read: CS 252 Syllabus - Spring 2020 3. Read: Communications 4. Why Unix? 5. Unix account setup 6. Peek: Preface, Ch 1 7. Logging In 8. See website for assignment. 2 The Basics: Working in Text Mode 2.1 Files and Directories Objectives Upon completing this section, a student should… Understand the hierarchical structure of a typical file system. Understand how paths identify the location of a file. Recognize the various ways to name their own home directory and those of other account holders. Understand the difference between relative and absolute paths. Write both absolute and relative paths to a desired file. Be able to issue basic commands for creating and listing directories, copying, moving, and viewing the contents of files. 1. Working in a Text-Based Interface 2. Peek: Ch 3 3. Taylor, ch 3, 4, 6 4. The Unix File System 5. Basic File Manipulation 6. See website for assignment. 7. Getting Help 2.2 The Elements of Unix Commands Objectives Upon completing this section, a student should be able to… Understand the common special characters available in the command shell. Use special characters to speed up and simplify the typing of commands. Use the three forms of quoting (single quotes, double quotes, and backslashes) to suppress special character actions. Be able to use wildcard patterns to describe lists of multiple files. 1. Typing Unix Commands 2. Patterns for File Names: Wildcards 3. Peek: Ch 4 4. Quoting Special Characters 5. See website for assignment. 2.3 Editing Files Objectives Upon completing this section, a student should be able to… Discuss the relative merits of the nano, emacs, and vim editors. Use at least two of those editors to create and modify text files. 1. Editing in Text Mode 2. Sobell, ch 6,7 3. See website for assignment. 2.4 Protection Objectives Upon completing this section, a student should be able to… Understand the Unix file permissions model. List the permissions being granted by a file. Change the permissions granted by a file. 1. Tansley, ch 1 2. File Protection 3. See website for assignment. 2.5 File Transfer Objectives Upon completing this section, a student should be able to… Identify the common protocols used to transfer files from one computer to another over a network. Understand the difference in ASCII text file format between Windows and other operating systems (Unix, Android, OS/X). Transform ASCII text files from Windows format to Unix and vice versa. Use SFTP to transfer files between their own PC and the CS Dept servers. 1. Peek: Ch 6 2. File Transfer 3. See website for assignment. 2.6 Regular Expressions Objectives Upon completing this section, a student should be able to… Write regular expression patterns to describe desired text during search operations. Use common commands for searching through the contents of files and for doing simple text replacements within a file. 1. Patterns for Text: Regular Expressions 2. Tansley, ch 7-8, 10 3. See website for assignment. 2.7 Modifying and Combining Commands Objectives Upon completing this section, a student should be able to… Use input redirection to send the contents of a file to the input of a command that is expecting standard (keyboard) input. Use output redirection to send the output of a command into a file rather than to the screen. Employ pipes to use the output of one command as the the input of another. Use the find and xargs commands to search for and operate on groups of files. 1. Peek: Ch 5 2. Venkateshmurthy, Ch. 4 3. Redirection and Pipes 4. Commands That Launch Other Commands 5. See website for assignment. 3 Program Development in Text-Mode 3.1 Compiling Objectives Upon completing this section, a student should be able to… Issue appropriate commands to compile simple C++, C, and Java programs. Issue the sequence of steps required to compile programs consisting multiple compilation units. Capture lengthy lists of error messages for later examination. 1. Compiling and Executing Programs 2. Dealing with Error Messages 3. See website for assignment. 3.2 Project Management (make) Objectives Upon completing this section, a student should be able to… Use the ’make` program to automate a series of project build steps. Write make files describing the automation of a typical programming project. 1. Project Management with Make 2. See website for assignment. 3. Compiling in Editors 4 Working in Graphics Mode 4.1 The X Window System Objectives Upon completing this section, a student should be able to… Launch a remote graphics-based session using a compressed X protocol (X2Go). Launch xterms and other X-based programs for operation from their own PC. Discuss the relative merits of the gedit, emacs, and vim editors in a graphics-mode session. 1. Peek: Ch 7 2. The X Window System 3. Editing under X 4. Troubleshooting X 5. See website for assignment. 4.2 Program Development: IDEs Objectives Upon completing this section, a student should be able to… Identify the components comprising a typical IDE. Employ the IDEs available on the CS Linux servers (emacs, Code::Blocks, and Eclipse) to create and compile C++ programs. 1. IDEs for Compiling under X 2. See website for assignment. 4.3 Debugging Objectives Upon completing this section, a student should be able to… Understand the value and basic operations of an automated debugger. Employ a debugger to step through code set breakpoints examine the values of program variables examine the call stack Perform each of the above operations in nemiver, Code::Blocks, and `Eclipse. 1. Debugging 2. Debugging under X 3. See website for assignment. 5 Scripting 5.1 Environment Variables Objectives Upon completing this section, a student should be able to… Understand how environment variables affect shell commands. Set and examine environment variables. Use backticks to capture command output in an environment variable. Understand the role of the PATH variable. 1. Tansley, ch 16-18, 20 2. Shore Are a Lot of Shells! 3. Shell and Environment Variables 4. Customizing Your Unix Environment 5.2 Shell Scripts Objectives Upon completing this section, a student should be able to… Understand the concept of a script. Write simple scripts. Use control-flow features of the scripting language to modify the order in which script commands are issued.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages269 Page
-
File Size-