Yiqun “Eddie” Cao Riverside, CA 92507 Phd Candidate, Computer Science, UC Riverside [email protected]
Total Page:16
File Type:pdf, Size:1020Kb
Load more
Recommended publications
-
Introduction to Unix
Introduction to Unix Workbook Edition 4, December 2016 Document Number:3523-2016 If you require this document in an alternative format, such as large print, please email [email protected]. Copyright © IS 2016 Permission is granted to any individual or institution to use, copy or redistribute this document whole or in part, so long as it is not sold for profit and provided that the above copyright notice and this permission notice appear in all copies. Where any part of this document is included in another document, due acknowledgement is required. Introduction to Unix Introduction to Unix Contents Chapter 1. Getting started Chapter outline ................................................................................................................ 1 What is Unix? .................................................................................................................. 1 More on operating systems... ....................................................................................... 2 How is Unix built? ............................................................................................................ 3 Some terminology... ..................................................................................................... 3 Interacting with Unix machines ..................................................................................... 3 Logging in ........................................................................................................................ 4 Choosing a password – advice ........................................................................................ -
A Secure Shell Scripting Language
SHILL: A Secure Shell Scripting Language Scott Moore, Christos Dimoulas, Dan King, and Stephen Chong Harvard School of Engineering and Applied Sciences Abstract require significant changes to existing software, and are The Principle of Least Privilege suggests that software often not available to all users [16]. For both of these rea- should be executed with no more authority than it re- sons, users tend to execute software with more authority quires to accomplish its task. Current security tools make than is necessary. it difficult to apply this principle: they either require sig- For example, consider scripts to grade homework sub- nificant modifications to applications or do not facilitate missions in a computer science course. Students submit reasoning about combining untrustworthy components. source code, and a script grade.sh is run on each sub- We propose SHILL, a secure shell scripting language. mission to compile it and run it against a test suite. The SHILL scripts enable compositional reasoning about se- submission server must execute grade.sh with suffi- curity through contracts that limit the effects of script cient authority to accomplish its task, but should also execution, including the effects of programs invoked by restrict its authority to protect the server from student- the script. SHILL contracts are declarative security poli- submitted code and ensure the integrity of grading. At a cies that act as documentation for consumers of SHILL coarse grain, the server should allow grade.sh to ac- scripts, and are enforced through a combination of lan- cess files and directories necessary to compile, run, and guage design and sandboxing. -
The Unix Shell (Slides Used in the Workshop) David Mckain Software Carpentry Workshop - 4Th & 11Th February 2020 Lesson Links
The Unix Shell (Slides used in the workshop) David McKain Software Carpentry Workshop - 4th & 11th February 2020 Lesson links Please keep open in your web browser: 1. Shared info to cut & paste during today’s session: tinyurl.com/swc-feb-2020 2. The Unix Shell Software Carpentry lesson: http://swcarpentry.github.io/shell-novice/ Notes & hints: • Link (2) can be accessed from (1) • Keep the above pages open in browser tabs • I’ll regularly sync the material - put your hand up if lost! Welcome! • Based on The Unix Shell Software Carpentry lesson • Goals: • Explain what Unix is why you’d want/need to use it • Get experience with some of the most common Unix commands • Get comfortable finding your way around your files on Unix systems • Teach you enough to be able to do cool stuff (e.g. use Eddie / supercomputers...) • Show you that the Unix Shell is less scary than it might seem! • Learn a bit about Unix Philosophy Session outline We’ll do a mix of: Topics • Short expositional talks Week 1: • Live examples • Introducing Unix & Shell • Exercises & feedback • Navigating Files & Directories • Random nonsense • Working with Files & Directories • Handy Unix commands • Pipes & Filters Week 2: • Loops & Variables • Shell Scripts • Finding Things Preparation Preparation Open the Setup page in the lesson and: 1. Download and extract the sample data ZIP as directed 2. Make sure you can open a shell • Mac & Linux: Use the Te r m i n a l application • Windows: Run Git Bash 1. Introducing Unix & Shell Introduction Computers do 4 basic things: • Run programs • Store data • Communicate with each other • Interact with us Interaction in the 1960s: punched cards 1970s: Command Line Interfaces (CLI) 1980s: Graphical User Interfaces (GUI) CLI vs GUI • Graphical interfaces: • Easier to pick up at first • But can become limiting & repetitive • Command line interfaces: • Harder to learn at first • But becomes very efficient & versatile • Command line interfaces haven’t been killed by GUI! What is Unix? • A family of Operating Systems (c.f. -
Shell Scripting
PART I About the Ingredients CHAPTER 1: The History of Unix, GNU, and Linux CHAPTER 2: Getting Started CHAPTER 3: Variables CHAPTER 4: Wildcard Expansion CHAPTER 5: Conditional Execution CHAPTER 6: Flow Control Using Loops CHAPTER 7: Variables Continued CHAPTER 8: Functions and Libraries CHAPTER 9: Arrays CHAPTER 10: Processes CHAPTER 11: Choosing and Using Shells 0024485c01.indd24485c01.indd 1 77/26/11/26/11 88:31:56:31:56 AAMM 1 The History of Unix, GNU, and Linux The Unix tradition has a long history, and Linux comes from the Unix tradition, so to understand Linux one must understand Unix and to understand Unix one must understand its history. Before Unix, a developer would submit a stack of punched cards, each card representing a command, or part of a command. These cards would be read and executed sequentially by the computer. The developer would receive the generated output after the job had completed. This would often be a few days after the job had been submitted; if there was an error in the code, the output was just the error and the developer had to start again. Later, teletype and various forms of timeshar- ing systems sped up the matter considerably, but the model was basically the same: a sequence of characters (punch cards, or keys on keyboards — it’s still just a string of characters) submit- ted as a batch job to be run (or fail to run), and for the result to come back accordingly. This is signifi cant today in that it is still how data is transmitted on any computerized system — it’s all sequences of characters, transmitted in order.