3 Short Talks, NYC*BUG, 2016.02.03 Isaac (.Ike) Levy

Total Page:16

File Type:pdf, Size:1020Kb

3 Short Talks, NYC*BUG, 2016.02.03 Isaac (.Ike) Levy shell-fu 3 short talks, NYC*BUG, 2016.02.03 Isaac (.ike) Levy <[email protected]> disclaimer The views expressed in this presentation are my own and do not represent the views of my current or former employers, nor do they represent the *BSD projects, or NYC*BUG as a whole. No animals were harmed in the making of this presentation. community sidenote standing strong against ongoing abuse and harassment 3 short talks the 3 finger claw technique using atomic filesystem operations general shell-fu, (input and variable handling) shell-fu 3 short talks, NYC*BUG, 2016.02.03 Isaac (.ike) Levy <[email protected]> ber ike web bub matt ken dmr bwk djb doug ken dmr First with UNIX (the first unix shell) https://www.youtube.com/watch?v=tc4ROCJYbm0 AT&T Archives: The UNIX Operating System ken SRB, NYC*BUG 2015.11.19 http://www.nycbug.org/event/10636/ NYCBug.20151119.srb.pdf https://www.bell-labs.com/usr/dmr/www/ retro.pdf 1975, Ken Thompson was in Berkeley for a year "In 1975, Thompson took a sabbatical from Bell Labs and went to his alma mater, UC Berkeley. There, he helped to install Version 6 Unix on a PDP-11/70. Unix at Berkeley would later become maintained as its own system, known as the Berkeley Software Distribution (BSD)." ken mckusick joy beastie by 1982, TCP/IP, UFS, etc... 2012 1976, Ken Thompson returned to Murray Hill ~ 1976, the bourne shell not the right bourne srb 1969 1970 1971 1972 1973 http://www.levenez.com/unix UNIX Time-Sharing System UNIX Time-Sharing System UNIX Time-Sharing System UNICS First Edition (V1) Second Edition (V2) Third Edition (V3) september 1969 november 3, 1971 june 12, 1972 february 1973 Open Systems November 28, 2015 Éric Lévénez 1998-2015 <http://www.levenez.com/unix/> 1974 1975 1976 1977 http://www.levenez.com/unix SRI Eunice UNSW Mini Unix may 1977 LSX UNIX Time-Sharing System UNIX Time-Sharing System UNIX Time-Sharing System Fourth Edition (V4) Fifth Edition (V5) Sixth Edition (V6) november 1973 june 1974 may 1975 PWB/UNIX PWB 1.0 1974 july 1, 1977 USG 1.0 TS 1.0 1977 MERT 1974 RT 1.0 1977 1974 1975 1976 1977 http://www.levenez.com/unix SRI Eunice UNSW Mini Unix may 1977 LSX UNIX Time-Sharing System UNIX Time-Sharing System UNIX Time-Sharing System Fourth Edition (V4) Fifth Edition (V5) Sixth Edition (V6) november 1973 june 1974 may 1975 PWB/UNIX PWB 1.0 1974 july 1, 1977 USG 1.0 TS 1.0 1977 MERT 1974 RT 1.0 1977 ~ 1976, the bourne shell sh sh tcsh Thompson Shell PWB Mashey Shell T C shell Ken Thompson John Mashey Bill Joy 1969 1975 1978 reaction reaction dash sh ash Debian Almquist bourne shell Almquist Debian Linux Steven Bourne Kenneth Almquist 2011 1976 ~1989 bash sh ksh Gnu Bourne Again sh FreeBSD sh Korn shell Brian Fox Debian Linux David Korn 1989 ~1994 1983 sh ksh88 POSIX Shell Korn shell POSIX POSIX 1992 pkdsh 1988 Public Domain Korn OpenBSD ksh88 1999 Korn shell POSIX ksh93 1988 Korn shell rc Linux Distros Plan9, UNIX v10 1994? Tom Duff 1989 zsh Z Shell Paul Falstad 1990 sh sh tcsh Thompson Shell PWB Mashey Shell T C shell Ken Thompson John Mashey Bill Joy 1969 1975 1978 reaction reaction dash sh ash Debian Almquist bourne shell Almquist Debian Linux Steven Bourne Kenneth Almquist 2011 1976 ~1989 bash sh ksh Gnu Bourne Again sh FreeBSD sh Korn shell Brian Fox Debian Linux David Korn 1989 ~1994 1983 sh ksh88 POSIX Shell Korn shell POSIX POSIX 1992 pkdsh 1988 Public Domain Korn OpenBSD ksh88 1999 Korn shell POSIX ksh93 1988 Korn shell rc Linux Distros Plan9, UNIX v10 1994? Tom Duff 1989 zsh Z Shell Paul Falstad 1990 sh sh tcsh Thompson Shell PWB Mashey Shell T C shell Ken Thompson John Mashey Bill Joy 1969 1975 1978 reaction reaction dash sh ash Debian Almquist bourne shell Almquist Debian Linux Steven Bourne Kenneth Almquist 2011 1976 ~1989 bash sh ksh Gnu Bourne Again sh FreeBSD sh Korn shell Brian Fox Debian Linux David Korn 1989 ~1994 1983 sh ksh88 POSIX Shell Korn shell POSIX POSIX 1992 pkdsh 1988 Public Domain Korn OpenBSD ksh88 1999 Korn shell POSIX ksh93 1988 Korn shell rc Linux Distros Plan9, UNIX v10 1994? Tom Duff 1989 zsh Z Shell Paul Falstad 1990 wacky observations... sh sh tcsh Thompson Shell PWB Mashey Shell T C shell Ken Thompson John Mashey Bill Joy 1969 1975 1978 reaction reaction dash sh ash Debian Almquist bourne shell Almquist Debian Linux Steven Bourne Kenneth Almquist 2011 1976 ~1989 bash sh ksh Gnu Bourne Again sh FreeBSD sh Korn shell Brian Fox Debian Linux David Korn 1989 ~1994 1983 sh srb! ksh88 POSIX Shell Korn shell POSIX POSIX 1992 pkdsh 1988 Public Domain Korn OpenBSD ksh88 1999 Algol68 Korn shell Language POSIX ksh93 Stephen Bourne 1988 Korn shell 1968 rc Linux Distros Plan9, UNIX v10 1994? Tom Duff ABC Language 1989 Z Shell zsh Paul Falstad Z Shell 1990 Paul Falstad 1990 Python Language Guido van Rossum 1989 sh sh tcsh Thompson Shell PWB Mashey Shell T C shell Ken Thompson John Mashey Bill Joy 1969 1975 1978 reaction reaction dash sh ash Debian Almquist bourne shell Almquist Debian Linux Steven Bourne Kenneth Almquist 2011 1976 ~1989 bash sh ksh Gnu Bourne Again sh FreeBSD sh Korn shell Brian Fox Debian Linux David Korn 1989 ~1994 1983 sh srb! ksh88 POSIX Shell Korn shell POSIX POSIX 1992 pkdsh 1988 Public Domain Korn OpenBSD ksh88 1999 Algol68 Korn shell Language POSIX ksh93 Stephen Bourne 1988 Korn shell 1968 rc Linux Distros Plan9, UNIX v10 1994? Tom Duff ABC Language 1989 Z Shell zsh Paul Falstad Z Shell 1990 Paul Falstad 1990 Python Language Guido van Rossum 1989 sh sh tcsh Thompson Shell PWB Mashey Shell T C shell Ken Thompson John Mashey Bill Joy 1969 1975 1978 reaction reaction dash sh ash Debian Almquist bourne shell Almquist Debian Linux Steven Bourne Kenneth Almquist 2011 1976 ~1989 bash sh ksh Gnu Bourne Again sh FreeBSD sh Korn shell Brian Fox Debian Linux David Korn 1989 ~1994 1983 sh srb! ksh88 POSIX Shell Korn shell POSIX POSIX 1992 pkdsh 1988 Public Domain Korn OpenBSD ksh88 1999 Algol68 Korn shell Language POSIX ksh93 Stephen Bourne 1988 Korn shell 1968 rc Linux Distros Plan9, UNIX v10 1994? Tom Duff ABC Language 1989 Z Shell zsh Paul Falstad Z Shell 1990 Paul Falstad 1990 Python Language Guido van Rossum 1989 people start agreeing on data type primitives sh sh tcsh Thompson Shell PWB Mashey Shell T C shell Ken Thompson John Mashey Bill Joy 1969 1975 1978 reaction reaction dash bourneish sh ash Debian Almquist bourne shell Almquist Debian Linux Steven Bourne Kenneth Almquist 2011 1976 ~1989 bash sh ksh Gnu Bourne Again sh FreeBSD sh Korn shell Brian Fox Debian Linux David Korn 1989 ~1994 1983 sh srb! ksh88 POSIX Shell Korn shell POSIX POSIX 1992 pkdsh 1988 Public Domain Korn OpenBSD ksh88 1999 Algol68 Korn shell Language POSIX ksh93 Stephen Bourne 1988 Korn shell 1968 rc Linux Distros Plan9, UNIX v10 1994? Tom Duff ABC Language 1989 Z Shell zsh Paul Falstad Z Shell 1990 Paul Falstad 1990 Python Language Guido van Rossum 1989 people start agreeing on data type primitives sh sh tcsh Thompson Shell PWB Mashey Shell T C shell Ken Thompson John Mashey Bill Joy 1969 1975 1978 reaction reaction dash sh ash Debian Almquist bourne shell Almquist Debian Linux Steven Bourne Kenneth Almquist 2011 1976 ~1989 bash sh ksh Gnu Bourne Again sh FreeBSD sh Korn shell Brian Fox Debian Linux David Korn 1989 ~1994 1983 sh ksh88 POSIX Shell Korn shell POSIX POSIX 1992 pkdsh 1988 Public Domain Korn OpenBSD ksh88 1999 Korn shell POSIX ksh93 1988 Korn shell rc Linux Distros Plan9, UNIX v10 1994? Tom Duff 1989 zsh Z Shell portability Paul Falstad 1990 3 short talks the 3 finger claw technique using atomic filesystem operations general shell-fu, (input and variable handling) the 3 finger claw technique existential functions Pai Mei White Lotus Clan, Shaolin Legendary 5 Elders, Kill Bill, Wu Tang Clan, etc... yell() { echo "$0: $*" >&2; } die() { yell "$*"; exit 111; } try() { "$@" || die "cannot $*"; } shout() { echo "$0: $*" >&2; } barf() { shout "$*"; exit 100; } safe() { "$@" || barf "cannot $*"; } original yell() { echo "$0: $*" >&2; } die() { yell "$*"; exit 111; } try() { "$@" || die "cannot $*"; } #!/bin/sh yell() { echo "$0: $*" >&2; } die() { yell "$*"; exit 111; } try() { "$@" || die "cannot $*"; } # using it try cd /some/place try tar xzvfp /elsewhere/stuff.tbz true the 3 finger claw technique, 3 short functions #!/bin/sh cd /some/place tar xzvfp /elsewhere/stuff.tbz #!/bin/sh cd /some/place tar xzvfp /elsewhere/stuff.tbz (a terrible program, stick that in cron?!) #!/bin/sh yell() { echo "$0: $*" >&2; } die() { yell "$*"; exit 111; } try() { "$@" || die "cannot $*"; } # using it try cd /some/place try tar xzvfp /elsewhere/stuff.tbz true #!/bin/sh yell() { echo "$0: $*" >&2; } die() { yell "$*"; exit 111; } try() { "$@" || die "cannot $*"; } # using it try cd /some/place try tar xzvfp /elsewhere/stuff.tbz true #!/bin/sh yell() { echo "$0: $*" >&2; } die() { yell "$*"; exit 111; } try() { "$@" || die "cannot $*"; } # using it try cd /some/place try tar xzvfp /elsewhere/stuff.tbz true #!/bin/sh yell() { echo "$0: $*" >&2; } die() { yell "$*"; exit 111; } try() { "$@" || die "cannot $*"; } # using it try cd /some/place try tar xzvfp /elsewhere/stuff.tbz true #!/bin/sh yell() { echo "$0: $*" >&2; } die() { yell "$*"; exit 111; } try() { "$@" || die "cannot $*"; } # using it try cd /some/place try tar xzvfp /elsewhere/stuff.tbz true #!/bin/sh yell() { echo "$0: $*" >&2; } die() { yell "$*"; exit 111; } try() { "$@" || die "cannot $*"; } # using it try cd /some/place try tar xzvfp /elsewhere/stuff.tbz true #!/bin/sh yell() { echo "$0: $*" >&2; } die() { yell "$*"; exit 111; } try() { "$@" || die "cannot $*"; } # using it try cd /some/place
Recommended publications
  • UNIX and Computer Science Spreading UNIX Around the World: by Ronda Hauben an Interview with John Lions
    Winter/Spring 1994 Celebrating 25 Years of UNIX Volume 6 No 1 "I believe all significant software movements start at the grassroots level. UNIX, after all, was not developed by the President of AT&T." Kouichi Kishida, UNIX Review, Feb., 1987 UNIX and Computer Science Spreading UNIX Around the World: by Ronda Hauben An Interview with John Lions [Editor's Note: This year, 1994, is the 25th anniversary of the [Editor's Note: Looking through some magazines in a local invention of UNIX in 1969 at Bell Labs. The following is university library, I came upon back issues of UNIX Review from a "Work In Progress" introduced at the USENIX from the mid 1980's. In these issues were articles by or inter- Summer 1993 Conference in Cincinnati, Ohio. This article is views with several of the pioneers who developed UNIX. As intended as a contribution to a discussion about the sig- part of my research for a paper about the history and devel- nificance of the UNIX breakthrough and the lessons to be opment of the early days of UNIX, I felt it would be helpful learned from it for making the next step forward.] to be able to ask some of these pioneers additional questions The Multics collaboration (1964-1968) had been created to based on the events and developments described in the UNIX "show that general-purpose, multiuser, timesharing systems Review Interviews. were viable." Based on the results of research gained at MIT Following is an interview conducted via E-mail with John using the MIT Compatible Time-Sharing System (CTSS), Lions, who wrote A Commentary on the UNIX Operating AT&T and GE agreed to work with MIT to build a "new System describing Version 6 UNIX to accompany the "UNIX hardware, a new operating system, a new file system, and a Operating System Source Code Level 6" for the students in new user interface." Though the project proceeded slowly his operating systems class at the University of New South and it took years to develop Multics, Doug Comer, a Profes- Wales in Australia.
    [Show full text]
  • A Political History of X Or How I Stopped Worrying and Learned to Love the GPL
    A Political History of X or How I Stopped Worrying and Learned to Love the GPL Keith Packard SiFive [email protected] Unix in !"# ● $SD Everywhere – $'t not actually BS% ● )*+* want, to make Sy,tem V real – S'rely they still matter ● .o Free So/tware Anywhere The 0rigins of 1 ● $rian Reid and Pa'l Asente at Stan/ord – - kernel → VGTS → W window system – Ported to VS100 at Stan/ord ● $o4 Scheifler started hacking W→ X – Working on Argus with Barbara Liskov at LCS – 7ade it more Unix friendly (async9, renamed X -AXstation 00 (aka v, 339 Unix Workstation Market ● Unix wa, closed source ● Most vendors ,hipped a proprietary 0S 4ased on $SD #.x ● S'n: HP: Digita(: )po((o: *ektronix: I$7 ● ;congratu(ation,: yo'<re not running &'nice=. – Stil(: so many gratuito', di/ference, -AXstation II S'n >?@3 Early Unix Window Systems ● S'n-iew dominated (act'al commercial app,A De,ktop widget,A9 ● %igital had -WS/UIS (V7S on(y9 ● )pollo had %omain ● *ektronix demon,trating Sma((*alk 1 B1@ ● .onB/ree so/tware ● U,ed internally at MIT ● Shared with friend, in/ormally 1 3 ● )(mo,t u,able ● %elivered by Digital on V)1,tation, ● %i,trib'tion was not all free ,o/tware – Sun port relied on Sun-iew kernel API – %igital provided binary rendering code – IB7 PC?2T support act'ally complete (C9 Why 1 C ● 1 0 had wart, – rendering model was pretty terrible ● ,adly, X1 wa,n't m'ch better... – External window management witho't borders ● Get everyone involved – Well, at lea,t every workstation vendor willing to write big checks X as Corporate *ool ● Dim Gettys and Smokey
    [Show full text]
  • Shell Script & Advance Features of Shell Programming
    Kirti Kaushik et al, International Journal of Computer Science and Mobile Computing, Vol.4 Issue.4, April- 2015, pg. 458-462 Available Online at www.ijcsmc.com International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer Science and Information Technology ISSN 2320–088X IJCSMC, Vol. 4, Issue. 4, April 2015, pg.458 – 462 RESEARCH ARTICLE Shell Script & Advance Features of Shell Programming Kirti Kaushik* Roll No.15903, CS, Department of Computer science, Dronacharya College of Engineering, Gurgaon-123506, India Email: [email protected] Jyoti Yadav Roll No. 15040, CS, Department of Applied Computer science, Dronacharya College of Engineering, Gurgaon-123506, India Email: [email protected] Kriti Bhatia Roll No. 15048, CS, Department of Applied Computer science, Dronacharya College of Engineering, Gurgaon-123506, India Email: [email protected] Abstract-- In this research paper, the idea of shell scripting and writing computer programs is examined and different parts of shell programming are likewise contemplated. A shell script is a PC system intended to be controlled by the UNIX shell which is a charge line translator. The different tongues of shell scripts are thought to be scripting dialects. Regular operations performed by shell scripts incorporate document control, program execution, and printing content. A shell script can give an advantageous variety ofa framework order where unique environment settings, charge alternatives, or post-transforming apply naturally, yet in a manner that permits the new script to still go about as a completely typical UNIX summon. The real ideas like Programming in the Borne and C-shell, in which it would be clarified that how shell programming could be possible in Borne and C-shell.
    [Show full text]
  • Allan Unix Newsletter
    allan Unix User Gro Newsletter ~folume 5 rnber 1 The Australian UNIX* Users Group Newsletter Volume V Number i CONTENTS Editorial 2 Survey Responses 2 New Newsletters 3 Next AUUG Meeting 3 Books 4 Book Review 6 Nets 8 AUNET Directory Ii Netnews 28 Clippings 34 Symposium on UNIX 38 Review of August 1983 AUUG Meeting 39 From the EUUG Newsletter 49 From ;login: 61 USENIX Technical Sessions at UNIFORUM 65 Letters 95 February 1984 AUUG Meeting Details 102 Copyright (c) 1984. AUUGN is the journal of the Australian UNIX User Group, Copying without fee is permitted provided that copies are not made or distributed for commercial advantage and credit to the source is given. Abstracting with credit is permitted, No other reproduction is permitted without the prior permission of the Australian UNIX User Group, * UNIX is a trademark of Bell Telephone Laboratories, AUUGN Vol V No i Editorial Do you have the feeling you have missed something in the last few years? Have your doors been blowing closed more often because you cannot find those old AUUGN issues? Well, have no fear, the editor who brought you volumes two and three has returned to bring you volume five. I would like to take this opportunity to apologise to all our regular subscribers for the problems they may have experienced in dealing with the editors of AUUGN during 1982 and 1983. Particular apologies must go to subscribers like the CSIRO, who paid for volume IV and received nothing. Well, enough of problems, on to the good stuff! In This Issue You will notice the appearance of a few new departments in this volume.
    [Show full text]
  • User-Level Window Managers for UNIX
    User-LevelWindowManagers for UNIX Robert J.K. Jacob NavalResearch Laboratory Washington, D.C. 20375 ABSTRACT Wm manages a collection of windows on a display terminal. Each windowhas its ownshell or other interactive program, running in parallel with those in the other win- dows. This permits a user to conduct several interactions with the system in parallel, each in its own window. The user can move from one windowtoanother,re-position a window, orcreate or delete a windowatany time without losing his or her place in anyof the windows. Windows can overlap or completely obscure one another; obscured win- dows can be "lifted" up and placed on top of the other windows. This paper describes howsuch a windowmanager for UNIX† is implemented as a set of user processes, without modifications to the UNIX kernel. It shows howthe sim- ple, but well-chosen facilities provided by the original (Version 6) UNIX kernel are suffi- cient to support wm.Inaddition, subsequent versions of wm exploit features of the kernel introduced into newer versions of UNIX to provide faster and more sophisticated window operations, still implemented entirely at the user level. Introduction This paper describes the design of a display windowmanager for UNIX implemented entirely as a set of user processes, without modifications to the UNIX kernel. It shows howthe simple facilities provided by the original (Version 6) UNIX kernel are sufficient to support such a windowmanager.Inaddition, more recent versions of the windowmanager exploit features of the kernel introduced into newer versions of UNIX to provide faster and more sophisticated operations in windows, still implemented entirely outside the kernel.
    [Show full text]
  • CBCE"1Jum11m(] CD~Cbul1 Ij0d~
    TOP SECRET OJalUOCDOJallb ~l!CBC!JWOU~ UJl]l!OJCB~ ll~WU l]l!~~l]l! l]f,J Wl5£ill!ll5 ~ W(lJ~~l1WllJC!l CBCE"1Jum11m(] CD~CBUl1 iJ0D~ 86-36 PARTIAL MACHINE TRANSLATION: FINAL REPORT (U) .. J . ~ .•• 1 TRACKS IN THE SANDS OF TIME (U)•••••••••••••••••Fred Mason •••••••• 0 ••••••••• 12 NSA-CROSTIC NO. 39 (U) •••••••••••••••••••••••••• David H. Willimas.~.•• •••••· •• 14 REVIEW: THE AMERICAN MAGIC (U) ...... _.......... ·I V··· . .; ......... 16 SHELL GAME (U) •••••••••••••••••••••••••••••••••• w. E. s ••••.•• ,/ .• .,,,~ ••... i ••. 20 WORD PROCESSING IN A4 (U)................... •.• • t ••• • ••..•• •i ••• • 22 BOOKBREAKERS' FORUM ON MACHINE AIDS (U)........ I••••••• •• •••• 27 PERSONAL COMPUTER APPLICATION (U) • • • • • • • • • • • • • • t ••••• 28 THIS 9QCUAIENT CQNT.~INS CQ9EWQR9 l\ft.:F8RIAb Sln\SSIFIEB BY NS1t/eSSM 123•2 TOP SECRET ItEVImf 6'M 16 Apt 2612 DP=classifiect and Approyeci for RP-lease o ... ..- t;JSA on 1 0-1 ?-201? pursuant to EC) 135 -:;- o M O R C::asR # $4 7 'j %"") DOCID: 4033690 Published by Pl. Techniques and Standards. for the Personnel of Operations Editorial VOL. IX. No. 4 APRIL 1982 By now it seems safe to announce that :.., J ~ · CRYPTOLOG is once again coming out on a '•;:. PUBLISHER monthly schedule. That was our objective bac~ in October, but there were a lot of questions BOARD OF EDITORS about whether it could be done. Editor-in-Chief • ._I______ _. (7119/8322s) Production ••••••••••• ~... ________I (3369s) We decided at the outset not to make any promises about publication schedules. These days there are so many people promising so Collection ...................l ___ .....,_~I (8555s) much, and yesterday's promises have a way of fading unfulfilled beneath the flood of ever Cryptanalysis ••••••••••• ~..
    [Show full text]
  • Unix and Linux System Administration and Shell Programming
    Unix and Linux System Administration and Shell Programming Unix and Linux System Administration and Shell Programming version 56 of August 12, 2014 Copyright © 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012, 2013, 2014 Milo This book includes material from the http://www.osdata.com/ website and the text book on computer programming. Distributed on the honor system. Print and read free for personal, non-profit, and/or educational purposes. If you like the book, you are encouraged to send a donation (U.S dollars) to Milo, PO Box 5237, Balboa Island, California, USA 92662. This is a work in progress. For the most up to date version, visit the website http://www.osdata.com/ and http://www.osdata.com/programming/shell/unixbook.pdf — Please add links from your website or Facebook page. Professors and Teachers: Feel free to take a copy of this PDF and make it available to your class (possibly through your academic website). This way everyone in your class will have the same copy (with the same page numbers) despite my continual updates. Please try to avoid posting it to the public internet (to avoid old copies confusing things) and take it down when the class ends. You can post the same or a newer version for each succeeding class. Please remove old copies after the class ends to prevent confusing the search engines. You can contact me with a specific version number and class end date and I will put it on my website. version 56 page 1 Unix and Linux System Administration and Shell Programming Unix and Linux Administration and Shell Programming chapter 0 This book looks at Unix (and Linux) shell programming and system administration.
    [Show full text]
  • Lab 1 FALL 2009
    CSE2301 Lab 1 FALL 2009 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 perform simple operations and submit a script of the terminal session. What is a shell? A shell is th interface between you and the computer. It accepts commands typed by the user and then uses the operating system in order to execute these commands. For example the command could be ls followed by enter sh-3.00$ ls emp.data f2 file1 one_liners.log one_liners.pdf p1 p3 f1 f3 ile2 one_liners.odt one_liners.ps p2 sh-3.00$ Before you enter ls the shell displayed the prompt (in this case sh-3.00$) and sits patiently waiting for your input. After typing ls and pressing enter, it takes the command (ls – listing all the files in the current directory) and runs it (using the OS) producing the shown output. Where the shell can find the program ls to run? There is a variable called PATH (We will discuss how to set PATH variable later). This variable lets the shell looks for any command that you type in specific places, if the command is not in one of the places defined by PATH, then the shell displays a message on the form (The exact form depends on what shell you are running on your system) sh-3.00$ Command not found ls is one of many basic commands that you can use to manipulate your files.
    [Show full text]
  • Network Driver for Micro Os Xv6
    NETWORK DRIVER FOR MICRO OS XV6 A Project Presented to the faculty of the Department of Computer Science California State University, Sacramento Submitted in partial satisfaction of the requirements for the degree of MASTER OF SCIENCE in Computer Science by Anmoldeep Singh Sandhu SPRING 2020 © 2020 Anmoldeep Singh Sandhu ALL RIGHTS RESERVED ii NETWORK DRIVER FOR MICRO OS XV6 A Project by Anmoldeep Singh Sandhu Approved by: __________________________________, Committee Chair Dr. Jinsong Ouyang __________________________________, Second Reader Dr. Jingwei Yang ____________________________ Date iii Student: Anmoldeep Singh Sandhu I certify that this student has met the requirements for format contained in the University format manual, and this thesis is suitable for electronic submission to the library. Credit is awarded for the Project. __________________________, Graduate Coordinator ___________________ Dr. Jinsong Ouyang Date Department of Computer Science iv Abstract of NETWORK DRIVER FOR MICRO OS XV6 by Anmoldeep Singh Sandhu The network driver is one of the primary requirements for any operating system. Xv6 is a micro-operating system based on version 6 Unix. The latest version of xv6 does not have support for the ethernet driver or the four-layer UDP/IP model. Our work extends the xv6 operating system to support a functioning network driver with the capability of handling a packet burst. This Project also adds support for UDP/IP and Ethernet protocol to the xv6 operating system. _______________________ Committee Chair Dr. Jinsong Ouyang _____________________ Date v ACKNOWLEDGMENTS I am thankful to Dr. Ouyang for providing me the opportunity to learn new skills in the field of driver development. Dr. Ouyang showed trust in me in carrying out this Project.
    [Show full text]
  • Getting Started with Raspberry Pi
    Intro Lab Session 1 Getting started with Raspberry Pi Contents 1.1 Introduction . 23 1.1.1 Using the Pi . 23 1.2 Processes and the Unix Shell . 26 1.2.1 The process ‘family tree’ . 27 1.3 File systems and files . 28 1.3.1 The Unix filesystem . 30 1.3.2 Files in more detail . 33 1.4 The Colossal Cave . 34 1.4.1 Installing Frotz, a Z-Machine Interpreter . 35 1.5 Quake . 37 1.6 RTFM . 39 1.7 Shutting down your Pi safely . 40 1.8 What have you learned? . 40 These notes are available online at syllabus.cs.manchester.ac.uk/ugt/COMP10120/labscripts/intro1.pdf We suggest you use the online version so that you can follow web links. 1.1 Introduction This and subsequent introductory labs contain a large amount of material. Don’t worry if you can’t complete it all during the timetabled lab session, but you should try to catch up outside the lab before your next session. As always, if you’re having problems, please tell someone and ask for help! 1.1.1 Using the Pi If all went well in the last lab session, your Pi should be ready for use, but if you did not complete the Raspbian configuration, please go back to the Welcome Lab 0 notes and finish it now. September 20, 2017 23 Introductory Labs Getting started with Raspberry Pi working username directory pi@raspberrypi ~ $ hostname type after this Figure 1.1 The different components of the Pi’s default command prompt.
    [Show full text]
  • An X86/64 Separation Kernel for High Assurance
    Muen - An x86/64 Separation Kernel for High Assurance Reto Buerki Adrian-Ken Rueegsegger August 29, 2013 University of Applied Sciences Rapperswil (HSR), Switzerland ii Abstract Computer systems are used to store and protect highly sensitive data. At the same time the resources and determination of attackers have increased significantly. Therefore, systems capable of safeguarding critical information must conform to rigorous quality standards to establish trust in the correct functioning. Attaining high assurance for today's monolithic operating systems is exceptionally hard since they tend to be large and include complex functionality. This fact is highlighted by regular security updates provided by operating system vendors. Thus, they are a weak foundation for building secure systems. In contrast, microkernels can be well suited as a basis for systems with strict demands on robustness. They are by definition small, which is a precondition for rigorous verification of correctness. Additionally, they lend themselves to the construction of component-based systems where the incorrect behavior of one partition does not impact the whole system. A separation kernel (SK) is a specialized microkernel that provides an execution environment for multiple components that can only communicate according to a given policy and are otherwise isolated from each other. Hence, the isolation also includes the limitation of potential side- and covert channels. SKs are generally more static and smaller than dynamic microkernels, which minimizes the possibility of kernel failure and should ease the application of formal verification techniques. Recent addition of advanced hardware virtualization support for the Intel x86 architecture has the potential of greatly simplifying the implementation of a separation kernel which can support complex systems.
    [Show full text]
  • CS 5142 Scripting Languages
    CS 5142 Scripting Languages 9/23/2013 Bash Scripting Outline • Bash CS 5142 Cornell University 2 9/23/13 Bash About Bash • Bash is one of many Unix shells • Unix shell = interactive command line interface – Used to manipulate files and control processes – Shell script = sequence of shell commands stored in a file and used like a program – As users wrote more elaborate shell scripts, shells grew into early scripting languages • History / naming – Original Thompson shell (Ken Thompson 1969) – Replaced by Bourne shell (Stephen Bourne 1977) – Most shells today are Bourne-compatible – Bash = Bourne-Again SHell (Brian Fox 1987) – Bash is default on Linux, Mac OS X, and Cygwin CS 5142 Cornell University 3 9/23/13 Bash How to Write + Run Code • Read-eval-print loop: bash • Run script from file: bash file.sh • Run script stand-alone: #!/bin/bash • One-liner: bash -c 'command’ • Runs automatically: .bashrc, .bash_profile CS 5142 Cornell University 4 9/23/13 Bash Example #!/bin/bash USAGE=$(cat <<EOF Usage: compileall [options] Options: -v | -verbose Show executed commands. -p | -pretend Don''t actually compile, only show commands. EOF ) VERBOSE=false PRETEND=false while [ 0 -lt $# ]; do case "$1" in -v | -verbose) VERBOSE=true;; -p | -pretend) PRETEND=true VERBOSE=true;; *) echo "Unknown option $1."; echo "$USAGE"; exit 1;; esac shift done for f in *.c; do COMMAND="gcc -o ${f%.c}.exe $f" if [[ $VERBOSE == true || $PRETEND == true ]]; then echo $COMMAND; fi if [[ $PRETEND == false ]]; then $COMMAND; fi done CS 5142 Cornell University 5 9/23/13 Bash
    [Show full text]