Appendix B. csh and tcsh Quick Reference

In This Appendix:

  • Command Structure

  • Startup and Shutdown Files

  • Variables

  • Special Characters

  • Command History

  • Moving Around the File System

  • Aliases

  • Filename Completion

  • Programmed Completion

  • Job Control

  • Command Editing in tcsh

This appendix briefly summarizes shell features and characteristics. Examples and additional commentary may be found elsewhere in this handbook. See also the csh and tcsh manual pages.

Command Structure

A simple command (designated cmd below) consists of a command name, possibly followed by one or more arguments. This basic form may be modified or combined with other commands to form more complex command sequences:

cmd             Run cmd
cmd &           Run cmd in the background
cmd > file      Write cmd output to file (overwrites file)
cmd >> file     Write cmd output to file (appends to file)
cmd < file      Take cmd input from file
cmd1 ; cmd2     Run cmd1, then cmd2
cmd1 | cmd2     Write cmdl output to input of cmd2
(cmd1 ; cmd2)   Run cmdl cmd cmd2 in subshell
cmd1 'cmd2'     Use cmd2 to produce arguments for cmd1

Get Using csh & tcsh now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.