Research. Inc •
Total Page:16
File Type:pdf, Size:1020Kb
c: RESEARCH. INC •. CRAY® COMPUTER SYSTEMS UNICOS PRIMER SG-2010 Gopyright© 1986, 1987 by Gray Research, Inc. This manuat or parts thereof may not be reproduced in any form unless permitted by contract or by written permission of Gray Research, Inc. Cli::ai tIfJI',.'V RESEARCH, INC. PUBUCATION NUMBER SG-2010 ..... 1'.- ~ ~ Czay Raeudl. Inc. publicationa Ihculd be directed to the Diatributicn Center and comme:ntl .bouc tbeIe publications .hould be ctinIeted to: CRA Y JtBS8ARQI, INC. Technia1 PublioadaaI 1345 NOIthIand Olive M.doca 1WpM. MUu.Gca 55120 Revision Description February 1986 - First printing. Docwnentation to support the Cray operating system UNICOS, release 1.0. This documentation is derived from UNIX System V under license from AT&T Technologies, Inc. A Octo~ 1986 - Rewrite incorporating many editorial changes made in response to a usability study. This version of the manual is issued with the Cray operating system UNICOS, release 2.0. All trademarks are now documented in the record of revision. All previous versions of this manual are obsolete. B July 1987 - Complete rewrite and reorganization to support UNICOS release 3.0. This printing includes new features of UNICOS, many new examples, and documentation for the C shell as well as the Bourne shell. This printing obsoletes previous versions of this manual. B ii SG-2010 The UNICOS operating system is derived from the AT&T UNIX System V operating system. UNICOS is also based in part on the Fourth Berkeley Software Distribution under license from the Regents of The University' of California. The TCPIIP documentation is copyrighted by The Wollongong Group and may not be reproduced. transmitted. transcribed. stored in a retrieval system. or translated into any language or computer language. in any fonn or by any means. electronic. mechanical. magnetic. optical. chemical. manual or otherwise. except as provided in the license agreement governing the documentation or by written pennission of The Wollongong Group, Inc .• 1129 San Antonio Road. Palo Alto. California 94303. The Wollongong software and documentation is based in part on the Fourth Berkeley Software Distribution under license from The Regents of the University of California. @ The Wollongong Group 1985. CRAY. CRAY-l. UNICOS. and SSD are registered trademarks and APML. CFr. CF177. CFT2. COS. CRAY-2. CRAY X-MP. CSIM. 105. SEGLDR. SID. and SUPERLINK are trademarks of Cray Research. Inc. 3B20 is a trademark of AT&T. Apollo and DOMAIN are registered trademarks of Apollo Computer Inc. CDC is a registered trademark of Control Data Corporation. DEC. VAX, and VMS are trademarks of Digital Equipment Corporation. mM is a registered trademark of International Business Machines Corporation. IRIS is a trademark of Silicon Graphics, Inc. Pyramid is a trademark of Pyramid Technology Corporation. Sun Microsystems is a trademark of Sun Microsystems, Inc. UNIX is a registered trademark of AT&T. SG-2010 iii B PREFACE This manual provides introductory information on the Cray operating system UNICOS running on Cray computer systems. Other Cray Research, Inc. (CRI) publications detail specific aspects of the operating system. The following CRI manuals relate to UNICOS on any Cray computer system: Publication Title/Description SR-0066 Segment Loader (SEGLDR) Reference Manual; describes SEGLDR, an automatic loader for overlaid and nonoverlaid programs. SR-2011 UNICOS User Commands Reference Manual; describes UNICOS user commands. SR-2012 UNICOS System Calls Reference Manual; describes all UNICOS system calls and the error returns for these calls. SR-2014 UNICOS File Fonnats and Special Files Reference Manual; describes file formats and devices used by UNICOS. SO-2016 UNICOS Support Tools Ouide; describes software tools available to aid the UNICOS user. SO-2050 UNICOS Editors Primer; describes the three editors available under UNICOS, vi, ed, and ex. The following CRI manuals relate to UNICOS on CRA Y -2 computer systems only: Publication Title/Description SR-2013 CRA Y-2 UNICOS Libraries, Macros and Opdefs Reference Manual; describes all library routines available to users of the eRAY -2 computer system. The manual also describes macros and opdefs for UNlCOS and associated programming languages and contains calling sequence documentation. The following CRI manuals relate to UNICOS on CRA Y X-MP and eRA Y-1 computer systems: Publication Title/Description SR-0012 Macros and Opdefs Reference Manual; contains macro and opdef instructions for the Cray operating systems UNICOS and COS. SR-0113 Programmer's Library Reference Manual; describes the Cray Fortran routines available to users of the CRA Y X-MP and CRA Y-1 computer systems. SO-2010 v B Publica don Title/Description SR-0136 CRAY X-MP and CRAY~l C Library Reference Manual; desaibes the Clay C routines available to users of the CRAY X-MP and CRAY-l computer systems. B vi 5G-2010 CONTENTS 1. IN'I'R.ODUC110N .••••.....•••.•.•......•.•••.•.•.•...•••.•..••..•.•.....•.•.••••.•.•.••••••.•••.••••.•.••••..•••.••.•.•.•.•.•••••......•.•.•.•.•. 1-1 1.1 USING TInS MANUAL: WHAT YOU SHOULD KNOW............................................... 1-1 1.2 CONVENTIONS •...•...•...•.....•.•........•...•........•.•....•.....•.•.....•.....•.............••.•.•....•.•.•.....•..•.......... 1·2 1.3 DEFINTIONS ...•.•.............................•....••••...•.....••.....•..•........•.•..••..•.....•.......•.......•..•...•..•...... 1·2 1.4 ON-LINE MANUALS ..........•..........•....•.•....•.•..•...•.•••.•...•..••.•••.•.•...•.......•....•......•.............•..... 1-3 1.5 READER COMMEN1"S ............•.....•...•.•....•.••...•... ~............................................................... 1-4 2. BASICS FOR BEGINNERS .........••....•.............•..•..•..........•••.••....•.•.•...•.•........•.•.•.....•....•.•........•.........•.. 2-1 2.1 ACCESSING 'UNICOS ......................................................................................................... 2·1 2.1.1 LOGGING IN ........................................................................................................... 2-2 2.1.2 CHANGING YOUR PASSWORD ......................................................................... 2-2 2.1.3 LOGGING OFF ....................................................................................................... 2-3 2.1.4 CO~ LINE SYNTAX .....•.....•...........•••......•..••.•.......••.....•......................•... 2-3 2.2 FILES. ....•............ ...... ..... ..................... ...........•.•......•............• .•.••...........•..•.....• ....• ...•..•........... 2-4 2.2.1 NAMIN'G FILES .............................•...............•.....•.••....••••••.......•....•...•....•..........•... 2-4 2.2.2 CREATING AND SA VING FILES USING THE ed EDITOR ...•....•....•.•........... 2·5 2.2.2.1 Creating files with ed ..•..•.•••..•.•••••••••••.•••••••.••.•..•.•••••.••.•.•••....••••...••.••••••. 2-5 2.2.2.2 Editing files with ed commands .•...•.•.•••••••..••••••.••.•••••....••.•• .••.•.•.•••...•••. 2-5 2.2.2.3 Error messages and explanations in ed ••••••••••••••••••••••••••••••••••••••••••••••••• 2-7 2.2.2.4 Saving files in ed ••••.•.•.•..•..•••••.•..•••.•••••..••••••.••••••.••..•.•.•.••.•.•.•.•••••.•.••..... 2-7 2.2.2.5 Exiting ed ............................................................................................... 2-7 2.2.3 LIS11N'G N~S OF FILES ......•..........•...•.....•.•..•.•....•.......•..•.•......•.•...•..•........... 2-8 2.2.4 DISPLA YIN'G FILES .•.......•..•...••••...•......••••..•••••.....•.......•..•.......•......•..•.••..•....•..•... 2-9 2.2.4.1 Displaying files using the pg command ................................................ 2·9 2.2.4.2 Displaying files using the cat command ............................................... 2-9 2.2.4.3 Displaying files using the pr command ................................................ 2-9 2.2.5 RENAMING, COPYING, AND REMOVING FILES .......................................... 2-10 2.2.5.1 Renaming a file . ..... ......... ..... .....•. ..... ... ..•.•.... ..••....•........•.•.... ....•...........•. 2-10 2.2.5.2 Copying a file ..............••........................•••............................•................. 2-11 2.2.5.3 Removing a file ...........•...•.....••......................•........••.•.....•...............•...... 2-11 2.2.6 USING METACHARACTERS IN FILE NAMES ........•................•........••............ 2-12 2.2.6.1 The • metacharacter .....•......................•..•...•...............•........•.....•........... 2·12 2.2.6.2 The 0 metacharacters ...•.......•.•...................•.........•....................•........... 2-13 2.2.6.3 The ? metacharacter ..................•...•........•...•............................•.............. 2·14 2.2.6.4 The ' It and \ metacharacters ...........................................•..................... 2-14 2.2.7 SEARCHING FILES FOR TEXT PATTERNS: THE grep CO~ ..................................•..•.......................•...........................•................. 2-15 2.2.8 INTERPRETA nON OF METACHARACTERS .........................•..•.........•.•......... 2-17 SG·2010 vii B 2.2.9 USING MET ACHARACI'ERS WITHIN Fll..ES .................................................. 2-18 2.2.9.1 The A metacharacter .........•.....•..............••..••....•..................•......•..•.•.•.... 2-18 2.2.9.2 The $ metacharacter ..•••..............................•.•..........•.•......•.•...•...•.•........ 2-18 2.29.3 The . metacharacter .....................•.........•.•................. 00.........................