An Introduction to UNIX in the Department of Physics at The

Total Page:16

File Type:pdf, Size:1020Kb

An Introduction to UNIX in the Department of Physics at The An Intro duction to UNIX in the department of physics at The University of South Florida David A. Rabson March 1996, most recently edited August 2003 for Physics 4151 While I have triedtoroot out most old references, some undoubtedly remain, for which I apologize. i Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new features. ii Exp ect the output of every program to b ecome the input to another, as yet unknown, program. Don't clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don't insist on interactive input. iii Design and build software, even op erating systems, to be tried early, ideally within weeks. Don't hesitate to throwaway the clumsy parts and rebuild them. iv Use to ols in preference to unskilled help to lighten a programming task, even if you have to detour to build the to ols and exp ect to throw some of them out after you've nished using them. from M.D. McIlroy, E.N.Pinson, and B.A. Tague Unix Time-Sharing System Forward, The Bell System Technical Jounal, July -Aug 1978 vol 57, number 6 part 2, p. 1902. The author wishes to thank Christopher Myers, N. David Mermin, Todd Olson, Dan Sul livan, Stephen Langer, and Wil liam Newman for comments on earlier editions. He thanks John Wilkins for donating his lists of vi and jove com- mands, the latter of which have been adaptedtoemacs, and especial ly thanks Arthur Smith, the co-author of an earlier edition, for permission to revise the manual. The author takes ful l responsibility for the objectionable personal opinions expressed here and for the pedagogy of inundation. This document was set in gtro on a Sun Ultra 60 with parts in T X. E Note on the December 1995 edition: UNIX has b ecome a far more complicated op erating system than it was when Arthur Smith and I wrote the rst two editions of this manual, then titled An Introduction to UNIX at the Labora- tory of Atomic and Solid State Physics. Agreement on the ``standard places'' for les no longer exists, and manual pages, executables, and libraries are now scattered all over the system. Symb olic links, run-time libraries, T X, E and X Windows all add to what the b eginning user must learn. Worse, a dozen subtly di erentversions, in two a- vors, of the op erating system mean that commands that work on machine X don't on machine Y. Nonetheless, the underlying simplicity of the UNIX philosophy remains. I hop e to help the reader nd it. Note on June 1990 edition: several p eople have made useful suggestions for changes and additions to this b o oklet that could easily have tripled its size. I b elieve that 22 pages is the right length, or p erhaps even to o long, so I have not tried to address all the issues. 1 This manual ...................................................................................................................................................................................... 1 2 Conventions ...................................................................................................................................................................................... 1 3 Intro duction: Why UNIX? or, ``what is an op erating system?'' .................................................................................................... 1 4 Logging In and Out and Getting Started ......................................................................................................................................... 2 5 Commands and Information Useful to the Beginner ........................................................................................................................ 3 5.1 Useful control characters ....................................................................................................................................................... 3 5.2 ls list les and the UNIX lesystem .................................................................................................................................... 4 5.3 lo oking at les: cat and more and the shell's I/O redirection ............................................................................................ 5 5.4 moving and copying les ....................................................................................................................................................... 5 5.5 man and aprop os: where to nd help .................................................................................................................................... 5 5.6 mail ....................................................................................................................................................................................... 6 5.7 tin / nn read news electronic bulletin b oard ...................................................................................................................... 7 5.8 UNIX editor: vi ..................................................................................................................................................................... 7 5.9 If the terminal starts acting strangely ................................................................................................................................... 9 5.10 Printing ............................................................................................................................................................................... 9 5.11 What's Going On with the System ..................................................................................................................................... 9 5.12 General Information ab out UNIX commands ....................................................................................................................... 9 6 Intro duction to the Csh .................................................................................................................................................................... 10 7 Another Editor Emacs ................................................................................................................................................................... 11 8 Programming .................................................................................................................................................................................... 13 8.1 WhyC? ................................................................................................................................................................................ 13 8.2 section3 ............................................................................................................................................................................... 13 8.3 section2 ............................................................................................................................................................................... 15 8.4 make ...................................................................................................................................................................................... 15 8.5 Compiling and linking a C program ...................................................................................................................................... 15 8.6 Other Languages ................................................................................................................................................................... 16 9 A quick preview of some of UNIX's to ols ......................................................................................................................................... 16 9.1 grep ....................................................................................................................................................................................... 16 9.2 awk ........................................................................................................................................................................................ 16 9.3 sed ......................................................................................................................................................................................... 17 9.4 m4 ......................................................................................................................................................................................... 17 9.5 dc and b c ............................................................................................................................................................................... 17 9.6 a small numb er of the others ................................................................................................................................................. 17 10 Text Formatting .............................................................................................................................................................................. 17 10.1 nro / tro .......................................................................................................................................................................... 17 10.2 T X .................................................................................................................................................................................... 18 E 11 Graphics .........................................................................................................................................................................................
Recommended publications
  • Linux Information Sheet Linux Information Sheet
    Linux Information Sheet Linux Information Sheet Table of Contents Linux Information Sheet....................................................................................................................................1 Michael K. Johnson <[email protected]>.......................................................................................1 1.Introduction to Linux............................................................................................................................1 2.Linux Features......................................................................................................................................1 3.Hardware Issues....................................................................................................................................1 4.An Incomplete List of Ported Programs and Other Software...............................................................1 5.Who uses Linux?...................................................................................................................................1 6.Getting Linux........................................................................................................................................1 7.Legal Status of Linux............................................................................................................................2 8.News About Linux................................................................................................................................2 9.The Future.............................................................................................................................................2
    [Show full text]
  • Minutes and Appendices (MAPS)
    Bijlage S LATEX Editing Support 91 LATEX Editing Support Nelson H. F. Beebe Center for Scienti®c Computing Department of Mathematics South Physics Building University of Utah Salt Lake City, UT 84112 USA Tel: (801) 581-5254 FAX: (801) 581-4148 [email protected] Contents List of Figures A :: 1 Introduction 91 1 Online summary of LTEX mode. 94 2 More about LATEX mode. :: :::: 95 2Emacshistory 92 3 Online help for LaTeX-index. ::: 95 4 Local bindings in LATEX mode. ::: 96 3 Emacs editing model 92 5 More local bindings. : ::: :::: 96 6 .emacs ®le additions. ::: :::: 96 4 Emacs documentation 93 7 Letter template. ::: ::: :::: 107 5 Learning an Emacs editing mode 94 1 Introduction 6LATEX support 94 The structured markup of LATEX can be easy to read and 6.1 Preliminaries :: :::: ::: ::: 94 understand, but tedious to type. Its syntax of environ- 6.2 Creating a new LATEX®le::: ::: 97 ment groups bears a strong resemblance to the begin/ 6.3 LATEX macros :: :::: ::: ::: 98 end groups of the Algol family of computer program- 6.4 LATEX environments :: ::: ::: 99 ming languages, which can be described by rigorous 6.5 Common commands :: ::: ::: 99 grammars that in turn permit the automatic construc- 6.6 Math mode ::: :::: ::: ::: 100 tion of lexical analyzers and parsers, and structured 6.7 Dots, commas, and quotation marks 100 editors to support programming in those languages [4, 6.8 Font changes :: :::: ::: ::: 101 pp. 97±116, pp. 128±140, pp. 232-239]. This article de- 6.9 Comments ::: :::: ::: ::: 101 scribes a powerful facility for the preparation of LATEX 6.10 Mismatched delimiters : ::: ::: 102 documents using the Emacs text editor.
    [Show full text]
  • Guide to Unix/ Commands 1
    Guide_on_Unix [email protected] PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Wed, 11 Nov 2009 14:39:13 UTC Contents Articles Guide to Unix/ Commands 1 Guide to Unix/ Commands/ Summary 2 Guide to Unix/ Commands/ Getting Help 9 Guide to Unix/ Commands/ File System Utilities 11 Guide to Unix/ Commands/ Finding Files 23 Guide to Unix/ Commands/ File Viewing 25 Guide to Unix/ Commands/ File Editing 29 Guide to Unix/ Commands/ File Compression 30 Guide to Unix/ Commands/ File Analysing 34 Guide to Unix/ Commands/ Multiuser Commands 35 Guide to Unix/ Commands/ Self Information 37 Guide to Unix/ Commands/ System Information 38 Guide to Unix/ Commands/ Networking 42 Guide to Unix/ Commands/ Process Management 47 Guide to Unix/ Commands/ Devices 49 Guide to Unix/ Commands/ Kernel Commands 50 Guide to Unix/ Commands/ compress Commands 51 Guide to Unix/ Commands/ Miscellaneous 51 Guide to Unix/ Environment Variables 55 Guide to Unix/ Files 58 Guide to Unix/ BSD/ Introduction 65 Guide to Unix/ BSD/ OpenBSD 67 Guide to Unix/ Explanations/ Shell Prompt 69 Guide to Unix/ Explanations/ Quoting and Filename Expansion 73 Guide to Unix/ Explanations/ Pipes and Job Control 76 Guide to Unix/ Explanations/ Signals 77 Bourne Shell Scripting/ Quick Reference 80 Guide to Unix/ Explanations/ Introduction to Editors 85 Learning the vi editor/ vi Reference 88 Guide to Unix/ GNU Free Documentation License 98 References Article Sources and Contributors 104 Article Licenses License 105 Guide to Unix/Commands 1 Guide to Unix/ Commands The Unix command line is often considered difficult to learn.
    [Show full text]
  • GNU Emacs FAQ Copyright °C 1994,1995,1996,1997,1998,1999,2000 Reuven M
    GNU Emacs FAQ Copyright °c 1994,1995,1996,1997,1998,1999,2000 Reuven M. Lerner Copyright °c 1992,1993 Steven Byrnes Copyright °c 1990,1991,1992 Joseph Brian Wells This list of frequently asked questions about GNU Emacs with answers ("FAQ") may be translated into other languages, transformed into other formats (e.g. Texinfo, Info, WWW, WAIS), and updated with new information. The same conditions apply to any derivative of the FAQ as apply to the FAQ itself. Ev- ery copy of the FAQ must include this notice or an approved translation, information on who is currently maintaining the FAQ and how to contact them (including their e-mail address), and information on where the latest version of the FAQ is archived (including FTP information). The FAQ may be copied and redistributed under these conditions, except that the FAQ may not be embedded in a larger literary work unless that work itself allows free copying and redistribution. [This version has been somewhat edited from the last-posted version (as of August 1999) for inclusion in the Emacs distribution.] 1 This is the GNU Emacs FAQ, last updated on 6 March 2005. The FAQ is maintained as a Texinfo document, allowing us to create HTML, Info, and TeX documents from a single source file, and is slowly but surely being improved. Please bear with us as we improve on this format. If you have any suggestions or questions, please contact the FAQ maintainers ([email protected]). 2 GNU Emacs FAQ Chapter 1: FAQ notation 3 1 FAQ notation This chapter describes notation used in the GNU Emacs FAQ, as well as in the Emacs documentation.
    [Show full text]
  • Debian Reference
    Guía de referencia Debian Osamu Aoki <[email protected]> Coordinador de la traducción al español: Walter O. Echarri <[email protected]> ‘Autores’ en la página 251 CVS, dom sep 25 04:22:02 UTC 2005 Resumen Esta Guía de referencia Debian (http://qref.sourceforge.net/) intenta proporcionar un repaso amplio del sistema Debian al igual que una guía de usuario post-instalación Abarca diversos aspectos de la administración del sistema mediante ejemplos que utilizan comandos de la shell. Se brindan tutoriales, trucos e información sobre diversos temas: conceptos bási- cos del sistema Debian, consejos para la instalación del sistema, administración de paquetes Debian, el kernel de Linux en Debian, puesta a punto del sistema, creación de una puerta de enlace (gateway), editores de texto, CVS, programación y GnuPG para usuarios que no son desarrolladores. Nota de Copyright Copyright © 2001–2005 by Osamu Aoki <[email protected]> Copyright (Chapter 2) © 1996–2001 by Software in the Public Interest. Este documento puede ser usado en los términos descritos en la Licencia Pública GNU versión 2 o posterior. (http://www.gnu.org/copyleft/gpl.html) Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this document into another lan- guage, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English.
    [Show full text]
  • OPENSOURCES Voices from the Open Source Revolution Michael Tiemann Future of Cygnus Solutions: an Entrepreneur’S Account
    Eric S. Raymond A Brief History of Hackerdom Marshall Kirk McKusick Twenty Years of Berkeley Unix: From AT&T-Owned to Freely Redistributable Scott Bradner The Internet Engineering Task Force Richard Stallman The GNU Operating System and the Free Software Movement OPENSOURCES Voices from the Open Source Revolution Michael Tiemann Future of Cygnus Solutions: An Entrepreneur’s Account Paul Vixie Software Engineering Linus Torvalds The Linux Edge Robert Young Giving It Away: How Red Hat Software Stumbled Across a New Economic Model and Helped Improve an Industry Larry Wall Diligence, Patience, and Humility Bruce Perens The Open Source Definition Tim O'Reilly Hardware, Software, and Infoware Jim Hamerly and Tom Paquin with Susan Walton Freeing the Source: The Story of Mozilla Eric S. Raymond Edited by The Revenge of the Hackers Chris DiBona, Sam Ockman and Mark Stone OPENSOURCES Voices from the Open Source Revolution Edited by Chris DiBona, Sam Ockman and Mark Stone Copyright “Free Software” is Copyright c ; 1998 Richard M. Stallman Verbatim copying and duplication is permitted in any medium provided this notice is preserved. “A Brief History of Hackerdom” and “Revenge of the Hackers” are Copyright c ; 1998 Eric S. Raymond. These essays are free; you can redistribute them and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. These essays are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    [Show full text]
  • Concurrent Use of an Interactive TEX Previewer with an Emacs-Type Editor
    Concurrent Use of an Interactive TEX Previewer with an Emacs-type Editor Minato Kawaguti and Norio Kitajima Fukui University, Department of Information Science, 9-1, Bunkyo-3, Fukui, 910 Japan [email protected]. jp Abstract A new efficient method was developed for editing (LA)TEX source files. It uses the combination of an Emacs-type editor and a special version of xdvi . Source files may be edited whle browsing through the dvi preview screen simultaneously on the X window screen. Whenever a position is selected by cliclung the mouse on a page of the document on display on the screen, the corresponding location of the particular (LA)TEX source file is shown in the editor's buffer window, ready for inspection or for alteration. One may also compile and preview (and obviously edit as well) any part of the entire document, typically one of its constituent files, for efficiency's sake. Fundamental characteristics of the document, shaped by the specification of the document style and various defimtions found mostly at its root file, are retained even under partial compilation. The Editor for TEX This scheme of synchronizing an editor of the finest breed, of Emacs-type to be specific, with Since it is not easy to grasp what a document an acclaimed previewer will help improve, among looks like by simply reading the TEX source files, others, editing sessions for large TEX documents. the efficiency of editing a TEX document file can A typical document written in TEX, say a book be enhanced significantly if we can edit the TEX file manuscript, may consist of many files.
    [Show full text]
  • G. & Sivaselvan, S. B, and Gopalan N. P, a Beginner S Guide to Unix. PHI
    References: [1] G. & Sivaselvan, S. B, and gopalan N. P, A Beginner S Guide To Unix. PHI Learning Pvt. Ltd. [2] D. Sonnenschein, A guide to vi: visual editing on the UNIX system. Prentice-Hall, 1987. [3] L. Ayers, GNU Emacs and XEmacs. PRIMA TECH, 2001. [4] D. Cameron, GNU Emacs Pocket Reference. O’Reilly Media, Inc., 1999. [5] M. A. Schoonover, J. S. Bowie, and W. R. Arnold, GNU Emacs: UNIX Text Editing and Programming. Addison-Wesley Publishing Company, 1992. [6] L. L. Smith, How to Use the UNIX-LINUX Vi Text Editor: Tips, Tricks, and Techniques (and Tutorials Too!). LARRY L. SMITH, 2006. [7] M. G. Venkateshmurthy, Introduction to Unix and Shell Programming. Pearson Education India, 2005. [8] R. Petersen, Introductory Command Line Unix for Users. Surfing Turtle Press, 2006. [9] D. Cameron, J. Elliott, M. Loy, E. Raymond, and B. Rosenblatt, Learning GNU Emacs. O’Reilly Media, Inc., 2005. [10] A. Robbins, E. Hannah, and L. Lamb, Learning the Vi and Vim Editors. O’Reilly Media, Inc., 2008. [11] L. Lamb and A. Robbins, Learning the Vi Editor. O’Reilly Media, Inc., 1998. [12] B. LLC, Linux Text Editors: Vim, Vi, Pico, Nano, Emacs, Joe’s Own Editor, Gedit, Gphpedit, Ultraedit, Activestate Komodo, Scite, Bluefish, Geany, Nedit. General Books LLC, 2010. [13] J. Pedersen, Sams Teach Yourself Emacs in 24 Hours. Sams, 1999. [14] H.-P. Company, The Ultimate Guide to the Vi and Ex Text Editors. Benjamin/Cummings, 1990. [15] K. Srirengan, Understanding UNIX. PHI Learning Pvt. Ltd., 1998. [16] R. Roberts, S. G. Kochan, and P.
    [Show full text]
  • Dosbox, Hypnotix, Pogo and Editors
    Published on Tux Machines (http://www.tuxmachines.org) Home > content > Software: DOSBox, Hypnotix, Pogo and Editors Software: DOSBox, Hypnotix, Pogo and Editors By Roy Schestowitz Created 04/12/2020 - 8:49pm Submitted by Roy Schestowitz on Friday 4th of December 2020 08:49:57 PM Filed under Software [1] DOSBox Staging has a rather large new release out with 0.76.0 | GamingOnLinux[2] DOSBox Staging is the fork of the original emulator with an aim to modernize it and give it some more advanced features, with the latest release out now. An important project because DOSBox itself is a vital bit of free and open source software, one that has enabled us not to lose out on thousands of classic games. Ensuring that it keeps working on modern systems using modern features with DOSBox Staging is awesome. This release is a big one covering many parts of it enhancing "the quality of audio emulation (GUS, built-in MIDI, PC speaker), improved support for PowerPC and POWER8 architectures, and a healthy mix of usability, documentation, code quality improvements". They go into a lot more detail in the lengthy release notes, which make for an interesting read. Hypnotix ? Watch Live TV via Linux Mint developed IPTV Player | UbuntuHandbook[3] Want to watch live TV on Ubuntu Linux? Try Hypnotix, a new IPTV player developed by Linux Mint team. Hypnotix is a player application which streams from IPTV providers, which can be configured via a local M3U playlists, remote M3U URLs or the Xtream API. The player uses libmpv for video playback, and it?s configured to ship with Free-IPTV as default IPTV provider.
    [Show full text]
  • UBC Physics Administrator's Guide for Computer
    UBC Physics Administrator’s Guide for Computer Lab Eric Nodwell Copyright © 2003 Eric Nodwell This document can be freely redistributed according to the terms of the GNU General Public License. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This manual details how I installed the Linux Terminal Server in the UBC Physics Computer Lab. The server runs Debian Linux. It is assumed that the reader is somewhat familiar with administering Linux, but not necessarily with LTSP or Debian. Table of Contents Installation ...................................................................................... 2 BIOS Settings .............................................................................. 2 Debian Installation .......................................................................... 2 Configure Second Network Interface .......................................................... 5 Upgrade to the Testing Branch of Debian ...................................................... 6 Install Useful Software ...................................................................... 6 Correct xfs config file ...................................................................... 10 Install a firewall ..........................................................................
    [Show full text]
  • HP Palmtop Paper Lener from HAL GOLDSTEIN 1Haddeus PUBLISHER of the Computing INC
    MAR I APR 1993 Publisher's Message ......................... 3 U.S. $7.95 Letters to the Editor ........................... 4 HP News ............................................ 6 THE HP offers free Palmtop support to u.s. Users; Ask Thaddeus! discontinues service April 5. HPPalmtop New Products and Services ............ 7 File Transfer Between the 95LX and a PC or MAC ............ 12 Almost everyone using an HP 95LX needs to backup or download files. This article ~Paper . compares different approaches. EMBARC Messaaina Service ......... 20 If you 're on the roadand need to receive f·mail, take a look at Motorola's fMBARC service. QuickView: Personal Finance Software on the 95LX ...................... 23 QuickView 2.0 lets you import and work with Quicken files on the 95LX. Freyja2: a Powerful, Free System-Compliant Editor ............... 25 This powerful, free editor that comes with source code and gives programmers an excellent example of how fo write system compliant programs. Profile: The HP 95LX - A Must for Serious Studentsl ............... 27 A look at a college student's rather thorough use of the 95LX. Lots of good tips. User to User: PHONE Enhancing Products ........... 31 Check out these PHONE databases, conversion utilities, and programs that extend the usefulness of Phone Book. Bond Calculations Using the 95LX .............................. ... 35 Find out how easy it is to use HP CALC or Lotus 1-2-3 to do bond calculations. Looking Glass: User Keys Make Built-In Applications Work Together ................................. 37 Learn how to develop user defined keys to coordinate the activities of two or more built-in applications. Break through the 10-key barrier. Making the Connection: Using Memory Cards .....................
    [Show full text]
  • Debian Reference
    La guida Debian Osamu Aoki <[email protected]> Editor: David Sewell <[email protected]> Traduzione italiana: Davide Di Lazzaro <[email protected]> ‘Autori’ a pagina 257 CVS, dom set 25 04:21:54 UTC 2005 Estratto La guida Debian (http://qref.sourceforge.net/) è pensata per fornire un’ampio pa- norama del sistema Debian come una guida dell’utente post-installazione. Essa copre molti aspetti dell’amministrazione di sistema attraverso esempi di comandi da shell. Vengono pro- poste lezioni base, trucchi e molte altre informazioni su molti argomenti, tra cui i concetti fondamentali tipici di un sistema Debian, suggerimenti per l’ installazione, il sistema Debian di gestione dei pacchetti, il kernel sotto Debian, l’affinamento del sistema, la costruzione di un gateway, editor di testo, CVS, programmazione e GnuPG per i non sviluppatori. Avviso di Copyright Copyright © 2001–2005 by Osamu Aoki <[email protected]> Copyright (Chapter 2) © 1996–2001 by Software in the Public Interest. Questa guida può essere utilizzata nei termini della GNU General Public License versione 2 o successive. (http://www.gnu.org/copyleft/gpl.html) Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this document into another lan- guage, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English.
    [Show full text]