1.1 The UNIX at Fermilab Manual
This manual covers basic UNIX concepts and operations, and thus is especially geared to users who are new to UNIX. It also documents the UNIX environment and file systems commonly used at Fermilab, and thus is a handy reference for all users of Fermilab UNIX systems.
There are many different UNIX systems installed at Fermilab, with differing levels of conformance to Fermilab standards. Therefore, some of the information contained in this manual may not be valid for your system. You will very likely need to obtain supplementary documentation and information specific to your system.
In particular, CDF and D0 have created documentation for their systems and made it available on the World Wide Web (this utility is described in section 3.2.1). You can access this information at the following locations:
- CDF
-
http://www-cdf.fnal.gov/offline/cdfsga/cdfsga.html
- D0
-
http://d0wop.fnal.gov/d0unix/d0unix.html
|
The purpose of this manual is to help you get started as quickly and painlessly as possible in the UNIX environment here at Fermilab, as well as to help you use UNIX easily and efficiently, whatever your particular needs. We discuss the most commonly used UNIX concepts, commands and tools, and provide enough information to allow you to execute commands and perform tasks typically required by the Fermilab user community. We refer you to commercially available sources of information for details on commands and features that will allow you to exploit the more sophisticated features of the UNIX operating system not covered in this document. We also describe the Fermi UNIX Environment, which includes Fermilab-specific programs, libraries, tools, and usages, and occasionally refer you to other Fermilab documents.
We try to describe here a rather "standard UNIX" and recommend that you try not to use the "value-added" features that the individual vendors provide which may cause you trouble in conversion to another platform. Commands and features for both families of UNIX command interpreters (discussed in Chapter 4), C shell and Bourne shell, are included when they differ. Since some of the systems at Fermilab will have the AFS file system installed, we address some issues concerning AFS in Chapter 7.
It is not the purpose of this manual to teach you UNIX or to give you a complete description of UNIX. For that purpose we recommend that you obtain and read one of many good books on UNIX. See section 1.6 for some suggestions. This manual is also not intended as a system administration reference.
For those readers who wish to convert from VMS to UNIX quickly without learning about UNIX ahead of time, see Appendix A for the bare minimum needed to accomplish this task!
UNIX at Fermilab is bound to contain some errors, however we endeavor to minimize the error count! We encourage all the readers of this manual to report back to us:
- errors or inconsistencies that we have overlooked
- any parts of the manual that are confusing or unhelpful -- please offer constructive suggestions!
- other topics to include (keeping in mind the purpose of the manual)
- tricks that other Fermilab users might find helpful
Send your comments via email to cdlibrary@fnal.gov.
|
Copies of UNIX at Fermilab, document number GU0001, can be obtained from the following sources:
- WWW[1]
http://www.fnal.gov/docs/UNIX/unix_at_fermilab
-
You can reach this from the Fermilab Computing Division home page, under UNIX Resources or via the document database (see section 1.6.1). Paper Copies Wilson Hall, 8th floor, NE (outside the former Computing Division library)
- AFS
PostScript files are available under /afs/fnal/files/docs/UNIX/unix_at_fermilab/ps/rev1997/
1.1.1 Conventions Used in this Manual
The following notational conventions are used in this manual:
- bold
Used for shells (e.g., csh) and product names.
- italic
Used to emphasize a word or concept in the text; many terms found in the index are italicized in the text. Also used to indicate variables and reference book titles.
typewriter Used for filenames, path names, contents of files, output of commands.
In text, used to indicate commands and prompts. In command formats, indicates what the user types "as is".
- sans-serif (bold in html)
Used to indicate keys (on keyboard) and "buttons" on graphical applications.
bold-italic (not bold in html) In command formats, indicates variables for which the user must make context-specific substitutions.
- <Ctrl-char>
Indicates a control character. To enter a control character, hold down the control key (labeled Ctrl, probably) while pressing the key specified by char.
- [ ]
In command formats, indicates optional command arguments and options.
- |
When shown in between brackets ([x|y|z]) in a command line, separates a series of options from which one must be chosen. In UNIX command formats, used to "pipe" output of preceding command to the following one (see section 5.4.3).
' ... ' Single vertical quotes indicate apostrophes in commands.
` ... ` Single backquotes in UNIX commands have a special meaning (use output of string in place of string itself). Don't confuse them with apostrophes.
... Means that a repetition of the preceding parameter or argument is allowed.
% Prompt for C shell family commands (% is also used throughout this document when a command works for both shell families).
$ Prompt for Bourne shell family commands; also standard UNIX prefix for environment variables (e.g., $VAR means "the value to which VAR is set").
- { }
In environment variables, paths, files and other text strings, indicates strings for which the user must make context-specific substitutions. For example, ${PRODUCT}_DIR is $WWW_DIR for the product www, and {username}@{node} refers to a string like joe@fsui02.
All command examples are followed by an implicit carriage return key.
1.1.2 Summary of Chapters and Appendices
The organization of this manual reflects our compromise between providing a tutorial and a reference manual. You may find it useful to skip around a little rather than reading straight through. We recommend that you get a UNIX account and begin to work with the system as you read.
Chapters:
- 2: Getting Started on a UNIX System
-
- This chapter describes the login and logout procedures, and discusses some basic UNIX features including the prompt, special keys, and special characters. We present a brief discussion of the file systems you are likely to encounter at Fermilab, and how to change your password according to your file system and installation.
-
- 3: Information Resources
-
- This chapter introduces you to the information facilities available from UNIX. Standard UNIX on-line help is available via the man pages. We discuss the World Wide Web and newsgroups, which are very rich sources of information on a virtually unlimited set of topics. A few utilities that allow you to get information about vendor products, other users, and the Fermilab computing systems are also covered. Finally, we include instructions for communicating with the Fermilab Helpdesk.
-
- 4: Shells
-
- This chapter discusses the concept of a UNIX shell, and how to manipulate shells. It includes information on the available and recommended shells and their features. The concept of a shell as an interpretive programming language is introduced.
-
- 5: Important UNIX Concepts
-
- This chapter introduces you to the UNIX command structure, and to many important commands and concepts. The features introduced in this chapter constitute the core of the UNIX operating system, and many of these tools are quite powerful and flexible. Some of the features are shell-specific, and we provide the distinctions where necessary.
-
- 6: The UNIX File System
-
- The UNIX file system has a hierarchical or tree-like structure with the directory called root (
/) as its source. The system is essentially composed of files and directories. In this chapter we describe techniques for manipulating files and directories, and commands designed to provide information about them. -
- 7: The AFS File System
-
- Fermilab is using the AFS (Andrew File System) as a distributed file service model, and it is installed on several machines on site in a production environment, including the FNALU cluster. This chapter discusses the basic concepts of AFS and provides information on the commands used to manage your files and directories in the AFS environment.
-
- 8: Printing
-
- This chapter covers the standard FUE print utility flpr, as well as filter programs and techniques available for formatting the output prior to printing. flpr is the Fermi implementation of the standard UNIX lpr utility. Most software applications supplied by the Computing Division use flpr as a default.
-
- 9: Working Environment
-
- This chapter describes the methods used to set up your working environment in UNIX. Some of these are standard UNIX (e.g., shell and environment variables), and some are provided and/or customized by FUE (e.g., the login scripts).
-
- 10: Accessing Software Products
-
- In this chapter you will learn how to get information about the software products that are provided and supported by the Computing Division. We describe how to access products already installed on your system, and how to obtain a product from the Fermilab
KITS area and install it on your system. -
- [Missing image]A notice regarding upcoming changes is included.
-
- 11: Editors
-
- Several text editors are available at Fermilab. In this chapter we present our view of the advantages and disadvantages of the available editors, and we provide some basic information on the setup and use of each one. You will learn how to invoke each editor, and how to create, edit, and save a file in each one using a small subset of commands and features. We include only minimal usage information for the VMS-style editors.
-
- 12: UNIX Mail Systems
-
- This chapter describes how mail forwarding is managed at Fermilab and discusses the UNIX mail handlers that are currently available and supported.
-
- [Missing image]A notice regarding upcoming changes is included.
-
- 13: Connecting to Remote Systems
-
- Several utilities are available to enable you to transfer files between systems, to log into other systems on which you have an account, and to execute commands remotely. These features are described in this chapter.
-
- 14: Batch Processing Environment
-
- In this chapter we provide introductory information on LSF (Load Sharing Facility), the standard batch processing system at Fermilab, and on fbatch, the locally-written interface to LSF. We also list the related software components that can be used with LSF/fbatch.
-
- 15: Tape Handling
-
- In this chapter we discuss the principal tape handling software and facilities available at Fermilab. Start-up information for running and monitoring OCS tape mounts is provided, and the OCS X interface is introduced. Several tape I/O packages are briefly described.
-
- 16: Software Development
-
- This chapter gives an introduction to UNIX software development tools in common use at Fermilab, providing information on:
-
- Supported languages
- Compiling and linking in C, C++ and FORTRAN
- Debugging
- We do not include a discussion of general programming here, but rather, aspects of software development particular to UNIX.
-
- 17: The make Utility
-
- The UNIX make utility is a tool for organizing and facilitating the update of executables or other files which are built from one or more constituent files. Although make can be used in a wide variety of applications, in this chapter we concentrate on its use in the area of software development. We describe how to define relationships between source, object, library and executable files for use by make, and how to invoke make in its simplest and slightly more complex forms.
-
- 18: Code Management
-
- This chapter introduces the recommended code management solution for UNIX, CVS (Concurrent Versions System). We also introduce an alternative that is currently being used by a couple of Fermilab experiments, UCM (UNIX Code Management). Both packages use RCS (Revision Control System) as the underlying protocol. We provide basic information only, and refer you to the complete manuals for these utilities for detailed information.
-
Appendices:
- A: VMS Migration for the Impatient
-
- So, you've decided you're ready to convert (or you've run up against a deadline!), but you don't know the first thing about UNIX. Here's enough information to get you moved over. You can use the rest of the manual to learn about UNIX afterwards.
-
- B: UNIX Product Support (UPS) Overview
-
- In this appendix we discuss the Fermilab product support structure, UPS. We recommend that you read and understand this material before performing any of the tasks described in Chapter 10.
-
- [Missing image]A notice regarding upcoming changes is included.
-
- C: Fermi Login Files
-
- This appendix contains file listings of the FUE-customized default login files (the "Fermi Files") used to set up your UNIX environment. If you are on a FUE-compliant system, you are supplied with a copy of each file in your home directory (except for the
fermi.* and setup.* files which are executed directly from /usr/local/etc). The files are reprinted here in their entirety except for the copyright disclaimers. -
- D: awk's Programming Model
-
- This appendix is adapted from a section of the same name in the book sed & awk, published by O'Reilly & Associates. It describes the generic structure and organization of an awk program.
-
- E: VMS to UNIX Command Reference
-
- This appendix is intended as a convenient UNIX command reference for the migrating VMS user. The UNIX equivalents of commonly used VMS commands are listed in tabular format. No information on syntax, options, or arguments is presented here, however some of the listed commands are described elsewhere in UNIX at Fermilab.
-
- F: mh and exmh Customization
-
- This appendix contains information for further customizing the mh and/or exmh mail readers. Given the multitude of customizable features in these mail readers, we cannot provide you with a comprehensive treatment of the subject here. The information presented in Chapter 12 and this appendix should be sufficient for most users.
-
- G: mh Command Reference
-
- This appendix provides an alphabetical reference to the subset of mh commands discussed in Chapter 12.
-
- H: Mail Conversion from VMS
-
- This appendix is intended to guide you through a mail conversion process from VMS to the UNIX MH (Message Handling) system. Two options for conversion are presented.
-
- I: Programming Examples
-
- This appendix contains examples of programs that illustrate information presented in Chapters 16 and 17.
-