Unix Commands Unix Is a Command-Line Environment Similar to Microsoft's DOS Command Shell

Total Page:16

File Type:pdf, Size:1020Kb

Unix Commands Unix Is a Command-Line Environment Similar to Microsoft's DOS Command Shell Unix Commands Unix is a command-line environment similar to Microsoft's DOS command shell. We'll be using the bash shell as our environment. Unix has many features that make it an excellent development environment. Most of the commands are stored in directory /usr/bin and /bin. Note that directory separators in Unix are forward slashes. To list the contents of these directories, enter the following at the prompt ($): $ ls /usr/bin $ ls /usr Press the Tab key while entering a command and bash will complete the command using available file names. The ls command can be used to list files and directories. If you want to know more about the ls command enter the following: $ man ls This brings up a man page, or manual page, for the ls command. Most commands have man pages that describe command-line options. Use vi commands to navigate within man pages. Information can also be found with the info command: $ info ls Use the following commands to navigate within info: n next node p previous node u up menu tree l last node space scroll down DEL scroll up b beginning of page ? help q quit When you encounter menu links, position your cursor on the link and press ENTER. Typically more detailed and up-to-date information is available from info. Regular Expressions A regular expression can represent a pattern of zero or more characters. Consider the following regular expressions used with the ls command: $ ls *.c # list all files that end with '.c' $ ls [aA]* # list all files that start with 'a' or 'A' $ ls prog??.c # list all files prog01.c prog02.c progXX.c On the command line you can use the following glob characters for regular expressions: * zero or more characters ? one character [] character class Within applications, such as vi and grep, other more powerful expressions are allowed. Command Summary passwd Change password. Syntax passwd pwd Print name of current/working directory. Syntax pwd cd Change directory. Syntax cd [directory] Examples cd # go to $HOME cd ~ # go to $HOME cd ~/mydir # go to $HOME/mydir cd . # go to current directory (noop) cd ./dir1 # go to dir1 cd dir1 # go to dir1 cd /usr/bin # go to /usr/bin cd .. # go up 1 level (parent directory) cd ../.. # go up 2 levels mkdir Make a new directory. Syntax mkdir directory... Examples mkdir abc # make new directory abc mkdir abc def # make directories abc and def ls List files or directories. Syntax ls [option]... [file]... Options -R list subdirectories recursively -l use a long listing format -s sort by file size -t sort by modification time -r reverse sort order -a do not hide entries starting with "." -d list directory entries instead of contents -F append / after directories, * after executables Examples ls # list all files ls * # list all files ls *.c # list all files ending with ".c" ls –l main.c # list main.c in long format ls –l -t main.c func.c # list files in long format by time ls –lt main.c func.c # list files in long format by time ls dir1 # list contents of directory dir1 ls –ld dir1 # list attributes of dir1 rm Remove files or directories. Syntax rm [option]... file... Options -R remove the contents of directories recursively -r equivalent to –R -f ignore non-existant files, never prompt -i interactive, prompt before removing Examples rm main.c func.c # delete files main.c and func.c rm *.o # delete all object files rm –i *.c # remove all c files with prompt rm –r dir1 # remove directory dir1 cp Copy files or directories. Syntax cp [option]... file... Options -R copy the contents of directories recursively -r similar to –R, does not include special files -p preserve file attributes -i interactive, prompt before overwrite Examples cp a.c b.c # copy a.c to b.c cp a.c b.c dir1 # copy files a.c, b.c to directory cp –pr dir1 dir2 # recursively copy dir1 to dir2 # if dir2 exists cp to dir2/dir1 # else create dir2 mv Rename files or directories. Syntax mv [option]... file... Options -i interactive, prompt before overwrite Examples mv a.c b.c # rename a.c to b.c mv a.c dir1 # move a.c to dir1/a.c mv a.c dir1/b.c # move a.c to dir1/b.c chmod Change file access permissions. Syntax chmod [option]... mode file... Options r read permission w write permission x execute permission Examples chmod +x main # give file execute permission chmod –x main # remove execute permission chmod –w foo.c # make foo.c read-only Notes File permissions may be granted for three categories of users: user, group, and everyone. Within each category there are three access permissions: read, write, and execute. This makes a total of 9 permission settings. When you list files in long format, the output includes the following: drwxrwxrwx ... # directory with all permissions -rw-r--r-- ... # file writeable by user only -rw-rw-r-- ... # file writeable by user & group -rw-rw-rw- ... # file writeable by everyone The d will display if the file is a directory. This is followed by rwx entries for the user, group, and everyone. Note that execute permission, for a directory, must be enabled to view or go to that directory. echo Display string on stdout. Syntax echo [option]... string Options -n do not output trailing newline Examples echo hello world # display "hello world" on console echo hello world > foo # output "hello world" to file foo cat Concatonate files and print on stdout. Syntax cat [option]... [file]... Options -t show nonprinting characters Examples cat main.c # display main.c on stdout cat –t Makefile # show nonprinting characters cat *.c > foo # concatonate all c files to foo grep Print lines matching a pattern. Syntax grep [option]... pattern [file]... Options -i ignore case -l just display name of file containing match Examples grep main *.c # search for 'main' in all c files grep –i bagel *.c # case insensitive search bagel grep '[bB]agel' *.c # search for bagel or Bagel grep '^int' * # all lines beginning with 'int' grep –l '^int' * # just display file names grep ';$' *.c # all lines that end with ';' diff Compare files line by line. Syntax diff [option]... file1 file2 Options -i ignore case Examples diff a.c b.c # compare files a.c and b.c diff –i a.c b.c > foo # case insensitive, output to foo which Search PATH for executable and print location. Syntax which [option]... file Options -a display all occurrences Examples which cat # displays /usr/bin/cat which –a cat # displays /usr/bin/cat # /bin/cat tar Tape archiver. Backup/restore files and directories. Syntax tar [option]... [file]... Options -c create archive -x extract from archive -t table of contents -v verbose -z compress -p preserve permissions on extraction -f file specifies location of tar file Examples tar –cvf x.tar *.c # archive all .c files tar –tf x.tar # table of contents tar –tvf x.tar # verbose table of contents tar –xvf x.tar foo.c # extract file foo.c tar –xvf x.tar # extract all files tar –cvzf x.tar.gz . # archive & compress all files tar –xvzpf x.tar.gz # extract all files w/permissions tar –tzf x.tar.gz # table of contents wc Print the number of bytes, words, or lines in a file. Syntax wc [option]... [file]... Options -c characters -w words -l lines Examples wc main.c # count lines, words, chars wc –l main.c # count lines wc –l *.c # count lines, all c files kill Stop a process. Examples ps # find process ID (pid) kill –9 pid # kill process touch Update date/time stamp to current date/time. Examples touch main.c # update main.c touch *.c # update all .c files Pipes You can use pipes to channel the output of one program to the input of another program. For example: $ ls | wc –l will tell you how many files are in your directory. If we omit the file list for wc, then it counts the number of lines on stdin. The pipe channels stdout from the ls command to stdin for wc. Redirection You can redirect the output of any command to a file. Consider the following. $ ls # list current directory to monitor $ ls > foo # redirect listing to file foo There are two output streams, stdout and stderr. Stream stdout is for normal console output, and stderr is intended for console error output. The standard console input stream is stdin. > redirect stdout to file &> redirect stdout and stderr to file >> append stdout to file < fetch stdin from file If you have a lot of compilation errors, you may want to redirect the error output from the compiler to a file. $ gcc –c x.c &> err # redirect stdout and stderr to file 'err' What if you wanted the output of a command to be used on the command line of another command. For example... $ which cat # where is ls? /usr/bin/cat $ ls –l /usr/bin/cat # display attributes We can't just type $ ls –l which cat It will try to list attributes of files named which and cat in the current directory! For this task you can use back quotes: $ ls –l `which cat` Code within back quotes is executed, and the output is inserted at that point. Environment You can configure the environment to your liking. When you first login, a bash command file in your home directory, called .profile, automatically executes. Here is a sample profile. #!/bin/bash # change commands alias more="less" alias ls="ls -F" alias e="exit" alias path="echo \$PATH" alias gdb="gdb –q" # change prompt export PS1="$ " # marks # mrk <label> associate a directory with <label> # go <label> goto directory marked <label> # mrks display all marks mrk() { export MRK_$1="$PWD"; echo "$PWD"; } go() { eval cd \"$`echo "MRK_$1"`\"; echo "$PWD"; } mrks() { env | grep MRK_*; } if [ "$TMPDIR" = "" ] ; then export TMPDIR="$HOME/tmp" fi if [ ! -e $TMPDIR ] ; then mkdir $TMPDIR fi export PATH=".:$HOME/bin:$PATH" export EDITOR="vi" set -o vi The alias command substitutes text for a command entered at the console.
Recommended publications
  • Administering Unidata on UNIX Platforms
    C:\Program Files\Adobe\FrameMaker8\UniData 7.2\7.2rebranded\ADMINUNIX\ADMINUNIXTITLE.fm March 5, 2010 1:34 pm Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta UniData Administering UniData on UNIX Platforms UDT-720-ADMU-1 C:\Program Files\Adobe\FrameMaker8\UniData 7.2\7.2rebranded\ADMINUNIX\ADMINUNIXTITLE.fm March 5, 2010 1:34 pm Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Notices Edition Publication date: July, 2008 Book number: UDT-720-ADMU-1 Product version: UniData 7.2 Copyright © Rocket Software, Inc. 1988-2010. All Rights Reserved. Trademarks The following trademarks appear in this publication: Trademark Trademark Owner Rocket Software™ Rocket Software, Inc. Dynamic Connect® Rocket Software, Inc. RedBack® Rocket Software, Inc. SystemBuilder™ Rocket Software, Inc. UniData® Rocket Software, Inc. UniVerse™ Rocket Software, Inc. U2™ Rocket Software, Inc. U2.NET™ Rocket Software, Inc. U2 Web Development Environment™ Rocket Software, Inc. wIntegrate® Rocket Software, Inc. Microsoft® .NET Microsoft Corporation Microsoft® Office Excel®, Outlook®, Word Microsoft Corporation Windows® Microsoft Corporation Windows® 7 Microsoft Corporation Windows Vista® Microsoft Corporation Java™ and all Java-based trademarks and logos Sun Microsystems, Inc. UNIX® X/Open Company Limited ii SB/XA Getting Started The above trademarks are property of the specified companies in the United States, other countries, or both. All other products or services mentioned in this document may be covered by the trademarks, service marks, or product names as designated by the companies who own or market them. License agreement This software and the associated documentation are proprietary and confidential to Rocket Software, Inc., are furnished under license, and may be used and copied only in accordance with the terms of such license and with the inclusion of the copyright notice.
    [Show full text]
  • Types and Programming Languages by Benjamin C
    < Free Open Study > . .Types and Programming Languages by Benjamin C. Pierce ISBN:0262162091 The MIT Press © 2002 (623 pages) This thorough type-systems reference examines theory, pragmatics, implementation, and more Table of Contents Types and Programming Languages Preface Chapter 1 - Introduction Chapter 2 - Mathematical Preliminaries Part I - Untyped Systems Chapter 3 - Untyped Arithmetic Expressions Chapter 4 - An ML Implementation of Arithmetic Expressions Chapter 5 - The Untyped Lambda-Calculus Chapter 6 - Nameless Representation of Terms Chapter 7 - An ML Implementation of the Lambda-Calculus Part II - Simple Types Chapter 8 - Typed Arithmetic Expressions Chapter 9 - Simply Typed Lambda-Calculus Chapter 10 - An ML Implementation of Simple Types Chapter 11 - Simple Extensions Chapter 12 - Normalization Chapter 13 - References Chapter 14 - Exceptions Part III - Subtyping Chapter 15 - Subtyping Chapter 16 - Metatheory of Subtyping Chapter 17 - An ML Implementation of Subtyping Chapter 18 - Case Study: Imperative Objects Chapter 19 - Case Study: Featherweight Java Part IV - Recursive Types Chapter 20 - Recursive Types Chapter 21 - Metatheory of Recursive Types Part V - Polymorphism Chapter 22 - Type Reconstruction Chapter 23 - Universal Types Chapter 24 - Existential Types Chapter 25 - An ML Implementation of System F Chapter 26 - Bounded Quantification Chapter 27 - Case Study: Imperative Objects, Redux Chapter 28 - Metatheory of Bounded Quantification Part VI - Higher-Order Systems Chapter 29 - Type Operators and Kinding Chapter 30 - Higher-Order Polymorphism Chapter 31 - Higher-Order Subtyping Chapter 32 - Case Study: Purely Functional Objects Part VII - Appendices Appendix A - Solutions to Selected Exercises Appendix B - Notational Conventions References Index List of Figures < Free Open Study > < Free Open Study > Back Cover A type system is a syntactic method for automatically checking the absence of certain erroneous behaviors by classifying program phrases according to the kinds of values they compute.
    [Show full text]
  • UNIX Workshop Series: Quick-Start Objectives
    Part I UNIX Workshop Series: Quick-Start Objectives Overview – Connecting with ssh Command Window Anatomy Command Structure Command Examples Getting Help Files and Directories Wildcards, Redirection and Pipe Create and edit files Overview Connecting with ssh Open a Terminal program Mac: Applications > Utilities > Terminal ssh –Y [email protected] Linux: In local shell ssh –Y [email protected] Windows: Start Xming and PuTTY Create a saved session for the remote host name centos.css.udel.edu using username Connecting with ssh First time you connect Unix Basics Multi-user Case-sensitive Bash shell, command-line Commands Command Window Anatomy Title bar Click in the title bar to bring the window to the front and make it active. Command Window Anatomy Login banner Appears as the first line of a login shell. Command Window Anatomy Prompts Appears at the beginning of a line and usually ends in $. Command Window Anatomy Command input Place to type commands, which may have options and/or arguments. Command Window Anatomy Command output Place for command response, which may be many lines long. Command Window Anatomy Input cursor Typed text will appear at the cursor location. Command Window Anatomy Scroll Bar Will appear as needed when there are more lines than fit in the window. Command Window Anatomy Resize Handle Use the mouse to change the window size from the default 80x24. Command Structure command [arguments] Commands are made up of the actual command and its arguments. command -options [arguments] The arguments are further broken down into the command options which are single letters prefixed by a “-” and other arguments that identify data for the command.
    [Show full text]
  • System Log Commands
    System Log Commands • system set-log , on page 2 • show system logging-level, on page 3 • show log, on page 4 System Log Commands 1 System Log Commands system set-log system set-log To set the log level and log type of messages, use the system set-log command in privileged EXEC mode. system set-log level {debug | info | warning | error | critical} logtype {configuration | operational | all} Syntax Description level Specifies the log level. debug Logs all messages. info Logs all messages that have info and higher severity level. warning Logs all messages that have warning and higher severity level. error Logs all messages that have error and higher severity level. critical Logs all messages that have critical severity level. logtype Specifies the log type. configuration Configuration log messages are recorded. operational Operational log messages are recorded. all All types of log messages are recorded. Command Default For the configuration log, info is the default level. For the operational log, warning is the default level. Command Modes Privileged EXEC (#) Command History Release Modification 3.5.1 This command was introduced. Usage Guidelines After a system reboot, the modified logging configuration is reset to the default level, that is, info for the configuration log and warning for the operational log. Example The following example shows how to configure a log level: nfvis# system set-log level error logtype all System Log Commands 2 System Log Commands show system logging-level show system logging-level To view the log level and log type settings, use the show system logging-level command in privileged EXEC mode.
    [Show full text]
  • Dell EMC Powerstore CLI Guide
    Dell EMC PowerStore CLI Guide May 2020 Rev. A01 Notes, cautions, and warnings NOTE: A NOTE indicates important information that helps you make better use of your product. CAUTION: A CAUTION indicates either potential damage to hardware or loss of data and tells you how to avoid the problem. WARNING: A WARNING indicates a potential for property damage, personal injury, or death. © 2020 Dell Inc. or its subsidiaries. All rights reserved. Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries. Other trademarks may be trademarks of their respective owners. Contents Additional Resources.......................................................................................................................4 Chapter 1: Introduction................................................................................................................... 5 Overview.................................................................................................................................................................................5 Use PowerStore CLI in scripts.......................................................................................................................................5 Set up the PowerStore CLI client........................................................................................................................................5 Install the PowerStore CLI client..................................................................................................................................
    [Show full text]
  • Epmp Command Line Interface User Guide
    USER GUIDE ePMP Command Line Interface ePMP Command Line Interface User Manual Table of Contents 1 Introduction ...................................................................................................................................... 3 1.1 Purpose ................................................................................................................................ 3 1.2 Command Line Access ........................................................................................................ 3 1.3 Command usage syntax ...................................................................................................... 3 1.4 Basic information ................................................................................................................. 3 1.4.1 Context sensitive help .......................................................................................................... 3 1.4.2 Auto-completion ................................................................................................................... 3 1.4.3 Movement keys .................................................................................................................... 3 1.4.4 Deletion keys ....................................................................................................................... 4 1.4.5 Escape sequences .............................................................................................................. 4 2 Command Line Interface Overview ..............................................................................................
    [Show full text]
  • Powerview Command Reference
    PowerView Command Reference TRACE32 Online Help TRACE32 Directory TRACE32 Index TRACE32 Documents ...................................................................................................................... PowerView User Interface ............................................................................................................ PowerView Command Reference .............................................................................................1 History ...................................................................................................................................... 12 ABORT ...................................................................................................................................... 13 ABORT Abort driver program 13 AREA ........................................................................................................................................ 14 AREA Message windows 14 AREA.CLEAR Clear area 15 AREA.CLOSE Close output file 15 AREA.Create Create or modify message area 16 AREA.Delete Delete message area 17 AREA.List Display a detailed list off all message areas 18 AREA.OPEN Open output file 20 AREA.PIPE Redirect area to stdout 21 AREA.RESet Reset areas 21 AREA.SAVE Save AREA window contents to file 21 AREA.Select Select area 22 AREA.STDERR Redirect area to stderr 23 AREA.STDOUT Redirect area to stdout 23 AREA.view Display message area in AREA window 24 AutoSTOre ..............................................................................................................................
    [Show full text]
  • Unix: Beyond the Basics
    Unix: Beyond the Basics BaRC Hot Topics – September, 2018 Bioinformatics and Research Computing Whitehead Institute http://barc.wi.mit.edu/hot_topics/ Logging in to our Unix server • Our main server is called tak4 • Request a tak4 account: http://iona.wi.mit.edu/bio/software/unix/bioinfoaccount.php • Logging in from Windows Ø PuTTY for ssh Ø Xming for graphical display [optional] • Logging in from Mac ØAccess the Terminal: Go è Utilities è Terminal ØXQuartz needed for X-windows for newer OS X. 2 Log in using secure shell ssh –Y user@tak4 PuTTY on Windows Terminal on Macs Command prompt user@tak4 ~$ 3 Hot Topics website: http://barc.wi.mit.edu/education/hot_topics/ • Create a directory for the exercises and use it as your working directory $ cd /nfs/BaRC_training $ mkdir john_doe $ cd john_doe • Copy all files into your working directory $ cp -r /nfs/BaRC_training/UnixII/* . • You should have the files below in your working directory: – foo.txt, sample1.txt, exercise.txt, datasets folder – You can check they’re there with the ‘ls’ command 4 Unix Review: Commands Ø command [arg1 arg2 … ] [input1 input2 … ] $ sort -k2,3nr foo.tab -n or -g: -n is recommended, except for scientific notation or start end a leading '+' -r: reverse order $ cut -f1,5 foo.tab $ cut -f1-5 foo.tab -f: select only these fields -f1,5: select 1st and 5th fields -f1-5: select 1st, 2nd, 3rd, 4th, and 5th fields $ wc -l foo.txt How many lines are in this file? 5 Unix Review: Common Mistakes • Case sensitive cd /nfs/Barc_Public vs cd /nfs/BaRC_Public -bash: cd: /nfs/Barc_Public:
    [Show full text]
  • 'Unix' in a File
    ============================ AWK COMMANDS ================================ 1) find the total occurances of pattern of 'unix' in a file. ==> $awk '/unix/ {count++} END{print count}' nova.txt 2) find the total line of a file. ==> $awk 'END{print NR}' nova.txt 3) print the total number of even line of a file. ==> $awk 'NR % 2' nova.txt 4) print the total number of odd line of a file. ==> $awk 'NR % 2 == 1' nova.txt 5) print the sums of the field of every line of a file. ==> $awk '{ sum = $3+sum } END{print sum}' emp.txt 6) display those words whose length greater than 10 and consist of digits only in file awk ==> $awk '/^[0-9]+$/ length<10 {print}' t3.txt 7) display those words whose length less than 10 and consist of alpha only in file awk ==> $awk '/^[a-zA-Z]+$/ length >3 {print}' t3.txt 8) print odd number of word in each line ==> awk -F\| '{s="";for (i=1;i<=NF;i+=2) { {s=s? $i:$i} print s }}' nova.txt { s = ""; for (i = 1; i <= NF; i+=2) { s = s ? $i : $i } print s } 9) print even number of word in each line ==> awk -F\| '{s="";for (i=0;i<=NF;i+=2) { {s=s? $i:$i} print s }}' nova.txt ==> { s = ""; for (i = 0; i <= NF; i+=2) { s = s ? $i : $i } print s } 10) print the last character of a string using awk ==> awk '{print substr($0,length($0),1)}' nova.txt ============================ MIX COMMANDS ================================ 1) Assign value of 10th positional parameter to 1 variable x. ==> x=${10} 2) Display system process; ==> ps -e ==> ps -A 3) Display number of process; ==> ps aux 4) to run a utility x1 at 11:00 AM ==> at 11:00 am x1 5) Write a command to print only last 3 characters of a line or string.
    [Show full text]
  • 5 Command Line Functions by Barbara C
    ADAPS: Chapter 5. Command Line Functions 5 Command Line Functions by Barbara C. Hoopes and James F. Cornwall This chapter describes ADAPS command line functions. These are functions that are executed from the UNIX command line instead of from ADAPS menus, and that may be run manually or by automated means such as “cron” jobs. Most of these functions are NOT accessible from the ADAPS menus. These command line functions are described in detail below. 5.1 Hydra Although Hydra is available from ADAPS at the PR sub-menu, Edit Time Series Data using Hydra (TS_EDIT), it can also be started from the command line. However, to start Hydra outside of ADAPS, a DV or UV RDB file needs to be available to edit. The command is “hydra rdb_file_name.” For a complete description of using Hydra, refer to Section 4.5.2 Edit Time-Series Data using Hydra (TS_EDIT). 5.2 nwrt2rdb This command is used to output rating information in RDB format. It writes RDB files with a table containing the rating equation parameters or the rating point pairs, with all other information contained in the RDB comments. The following arguments can be used with this command: nwrt2rdb -ooutfile -zdbnum -aagency -nstation -dddid -trating_type -irating_id -e (indicates to output ratings in expanded form; it is ignored for equation ratings.) -l loctzcd (time zone code or local time code "LOC") -m (indicates multiple output files.) -r (rounding suppression) Rules • If -o is omitted, nwrt2rdb writes to stdout; AND arguments -n, -d, -t, and -i must be present. • If -o is present, no other arguments are required, and the program will use ADAPS routines to prompt for them.
    [Show full text]
  • The AWK Programming Language
    The Programming ~" ·. Language PolyAWK- The Toolbox Language· Auru:o V. AHo BRIAN W.I<ERNIGHAN PETER J. WEINBERGER TheAWK4 Programming~ Language TheAWI(. Programming~ Language ALFRED V. AHo BRIAN w. KERNIGHAN PETER J. WEINBERGER AT& T Bell Laboratories Murray Hill, New Jersey A ADDISON-WESLEY•• PUBLISHING COMPANY Reading, Massachusetts • Menlo Park, California • New York Don Mills, Ontario • Wokingham, England • Amsterdam • Bonn Sydney • Singapore • Tokyo • Madrid • Bogota Santiago • San Juan This book is in the Addison-Wesley Series in Computer Science Michael A. Harrison Consulting Editor Library of Congress Cataloging-in-Publication Data Aho, Alfred V. The AWK programming language. Includes index. I. AWK (Computer program language) I. Kernighan, Brian W. II. Weinberger, Peter J. III. Title. QA76.73.A95A35 1988 005.13'3 87-17566 ISBN 0-201-07981-X This book was typeset in Times Roman and Courier by the authors, using an Autologic APS-5 phototypesetter and a DEC VAX 8550 running the 9th Edition of the UNIX~ operating system. -~- ATs.T Copyright c 1988 by Bell Telephone Laboratories, Incorporated. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopy­ ing, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Published simultaneously in Canada. UNIX is a registered trademark of AT&T. DEFGHIJ-AL-898 PREFACE Computer users spend a lot of time doing simple, mechanical data manipula­ tion - changing the format of data, checking its validity, finding items with some property, adding up numbers, printing reports, and the like.
    [Show full text]
  • The Evolution of the Unix Time-Sharing System*
    The Evolution of the Unix Time-sharing System* Dennis M. Ritchie Bell Laboratories, Murray Hill, NJ, 07974 ABSTRACT This paper presents a brief history of the early development of the Unix operating system. It concentrates on the evolution of the file system, the process-control mechanism, and the idea of pipelined commands. Some attention is paid to social conditions during the development of the system. NOTE: *This paper was first presented at the Language Design and Programming Methodology conference at Sydney, Australia, September 1979. The conference proceedings were published as Lecture Notes in Computer Science #79: Language Design and Programming Methodology, Springer-Verlag, 1980. This rendition is based on a reprinted version appearing in AT&T Bell Laboratories Technical Journal 63 No. 6 Part 2, October 1984, pp. 1577-93. Introduction During the past few years, the Unix operating system has come into wide use, so wide that its very name has become a trademark of Bell Laboratories. Its important characteristics have become known to many people. It has suffered much rewriting and tinkering since the first publication describing it in 1974 [1], but few fundamental changes. However, Unix was born in 1969 not 1974, and the account of its development makes a little-known and perhaps instructive story. This paper presents a technical and social history of the evolution of the system. Origins For computer science at Bell Laboratories, the period 1968-1969 was somewhat unsettled. The main reason for this was the slow, though clearly inevitable, withdrawal of the Labs from the Multics project. To the Labs computing community as a whole, the problem was the increasing obviousness of the failure of Multics to deliver promptly any sort of usable system, let alone the panacea envisioned earlier.
    [Show full text]