You are on page 1of 8

The C shell provides the following built-in commands:

# alias bg break breaksw case cd chdir continue default dirs echo eval exec exit fg foreach glob goto hashstat history if jobs kill limit login logout nice nohup notify onintr popd pushd rehash repeat set setenv shift source stop suspend switch

Marks a command. Displays alias. Resumes job in the background. Resumes execution after the loop. Breaks from a switch command; resumes after the endsw command. Defines a label in a switch command. Changes directory. Changes directory, same as cd. Continues a loop. Specifies the default case in a switch. Displays the directory stack. Writes arguments to the standard output of the shell. Evaluates a command. Executes the command in the current shell. Exits the shell. Brings a job in the foreground. Specifies a looping control statement and execute a sequence of commands until reaching an end command. Writes arguments to the standard output of the shell, like the echo command, but without the new line. Continues execution after the specified label. Displays hash table statistics. Displays the history list. Executes a command if condition met. Lists active jobs. Sends a signal to a process. term (terminate) is the default signal. Sets or list system resource limits. Logs on. Logs out. Changes the priority of commands run in the shell. Ignores the hangup signal. Notifies the user about changes in job status. Tells the shell what to do on interrupt. Pops the top directory off the directory stack and changes to the new top directory. Exchanges the top two elements of the directory stack. Re-computes the hash table of the contents of the directories in the path shell variable. Repeats the execution of a command. Displays or set the value of a shell variable. Sets environment variables. Shifts shell arguments. Reads commands from a script. Stops a background job. Stops the current shell. Starts a switch.

time umask unalias unhash unlimit unset unsetenv wait while end @

Displays the time used to execute commands. Shows or set file permissions. Removes command alias. Disables the internal hash table. Removes limitations on system Resource. Deletes shell variables. Deletes environment variables. Waits for background jobs to complete. Executes the commands between the while and matching end statements repeatedly. Displays or set the values of all the shell variables.

Common unix commands and programs on pangea


Copyright Phillip Farrell. Last revision December 8, 2004

The following is a list of commonly used Unix programs and useful software installed on pangea, the School of Earth Sciences AlphaServer DS20E computer running Tru64 Unix version 4.0g. Program listings are organized by general subject categories. Keys preceded by a ^ character areCONTROL key combinations. On pangea, use the man program for more information on these programs, for example,

man cp
To find a program not on this list (and there are hundreds), try the man program with the -k option followed by a keyword, for example,

man -k tape
to find all on-line manual entries that refer to programs that work with tapes. Pangea also has access to the hundreds of public domain software packages, including the complete GNU software, that are compiled by the central systems group here on campus and made available via the AFS network file system. All of these programs are also referenced by the man program. You can see a list of these packages organized by category at the Index of Pubsw Software web site.

Terminal control characters for C-shell


^h, backspace erase previously typed character ^u ^d ^s ^q ^z DEL, ^c ^\
erase entire line of input so far typed end-of-input for programs reading from terminal stop printing on terminal continue printing on terminal suspend currently running job; restart with bg or fg kill currently running program and allow clean-up before exiting emergency kill of currently running program with no chance of cleanup

Also see a list of special characters that should not be used in filenames.

Login and authentication


login logout passwd
access computer; start interactive session disconnect terminal session change local login password; you must set a strong password that is not easily guessed

kinit kdestroy keeptoken

obtain kerberos ticket for connections to other kerberized computers destroy kerberos tickets (authorizations) request longer lifetime for kerberos ticket so long-running jobs can access AFS files

Information
date history pine msgs man info w, who whoami top uptime finger whois cat cp ls mv rm ln chmod crypt gzip, gunzip find cat more head tail vi pico grep
show date and time list of previously executed commands read or send email messages or networks news groups display system messages show online documentation by program name online documentation for GNU programs who is on the system and what they are doing who is logged onto this terminal show system stats and top CPU using processes show one line summary of system status find out info about a user@system look up information in the Stanford Directory

File management
combine files copy files list files in a directory and their attributes change file name or directory location remove files create another link (name) to a file set file permissions encode/decode a file with a private key compress/decompress a file find files that match specific criteria

Display contents of files


copy files to display device show text file on display terminal with paging control show first few lines of a file(s) show last few lines of a file; or reverse line order full-featured screen editor for modifying text files simple screen editor for modifying text files display lines that match a pattern

lpr pr diff cmp comm od strings file wc

send file to line printer format file with page headers, multiple columns, etc. compare two files and show differences compare two binary files and report if different compare two files; show common or unique lines display binary files as eqivalent octal/hex codes show printable text embedded in binary files examine file(s) and guess type: text, data, program, etc. count characters, words, and lines in a file

Directories
cd mkdir rmdir mv pwd
change to new directory create new directory remove empty directory (remove files first) change name of directory show current directory

Devices
df du * ~user $name \ ' " `
& summarize free space on disk drive show disk space used by files or directories

Special character handling for C-shell (See man csh)


match any characters in a file name shorthand for home directory of user substitute value of variable name turn off special meaning of character that follows in pairs, quote string with special chars, except ! in pairs, quote string with special chars, except !, $ in pairs, substitute output from enclosed command

Controlling program execution for C-shell (See man csh)


run job in background kill job in foreground suspend job in foreground restart suspended job in foreground run suspended job in background delimit commands on same line group commands on same line re-run earlier commands from history list

DEL, ^c ^z fg bg ; () !

jobs ps kill nice at crontab limit alias sh, csh | > < >> tee script pine msgs mail

list current jobs print process screen kill background job or previous process run program at lower priority run program at a later time run program at specified intervals see or set resource limits for programs create alias name for program (in .login) execute command file

Controlling program input/output for C-shell (See man csh)


pipe output to input redirect output to a storage file redirect input from a storage file append redirected output to a storage file copy input to both file and next program in pipe make file record of all terminal activity

Email and communication


process mail with fill-screen menu interface or read USENET news groups read system bulletin board messages send/read email; can be run by other programs to send exisiting files via email

uuencode,uudecode encode/decode a binary file for transmission via email finger whois talk rn sed vi emacs xemacs pico fmt fold xterm
translate real name to account name for email look up email addresses in the Stanford Directory interactive communication in real-time (chat) read USENET news groups

Editors and formatting utilities


programmable text editor for data streams full-featured editor for character terminals GNU emacs editor for character terminals GNU emacs editory for X Window terminals very simple text editor, same as pine Compose screen fill and break lines to make all same length break long lines to specified length

X Window client programs (output to X terminal or server)


provide login shell window

xauth xload xman pinex xemacs gv xdvi netscape gnuplot tex latex texpr dvips xdvi latex2html

manipulate authorization files show system load full screen online manual viewer send or recieve mail messages GNU emacs editor interface to contol gs to display PostScript or PDF files on screen display DVI files on X Window (screen preview) web browser interactive data plotting on screen

TeX typesetting system


process TeX files to DVI (device independent) output process LaTeX files to DVI process and print TeX and LaTeX in one step print DVI files on Postscript laser printer display DVI files on X Window (screen preview) translate LaTeX files to HTML (for web pages)

Printing
lpr lpq lprm
send file to print queue examine status of files in print queue remove a file from print queue

op lpc abort print queue qname to clear printer (all files saved) abort qname op lpc restart print queue qname start qname enscript sed awk perl sort tr cut paste dd gnuplot
convert text files to PostScript format for printing

Interpreted languages and data manipulation utilities


programmable text editor for data streams pattern scanning and processing language; 1985 vers. Practical Extraction and Report Language sort or merge lines in a file(s) by specified fields translate characters cut out columns from a file paste columns into a file copy data between devices; reblock; convert EBCDIC

Graphics and mapping


interactive data plotting; outputs to PostScript or X Window

GMT gs klogin krsh krcp ssh scp sftp telnet ftp rlogin rsh rcp host netscape lynx kermit gzip, gunzip tar

general 2D and 3D data processing and plotting software package; also plots maps "ghostscript" converter displays PostScript files on X Window displays or other devices

Networking/communications
remote login to kerberized computer; encrypted execute single command on remote kerberized computer; encrypted remote file copy to/from kerberized computer; encrypted remote login/command execution; encrypted remote non-interactive file copy; encrypted remote interactive file copy; encrypted remote network login - plain text password network file transfer program - plain text passwords remote login to "trusted" computer that is not kerberized execute single command on remote "trusted" computer remote file copy to/from "trusted" computer find IP address for given host name, or vice versa web browser for X Window terminals/servers web browser for character based (text-only) terminals transfer files over modem connections compress/decompress a file combine multiple files/dirs into single archive

uuencode, uudecode encode/decode a binary file for transmission via email

Compilers, interpreters and programming tools


csh ksh sh f77 f95 f2c cc, c89 cxx gcc g++ pc dbx ladebug
command language interpreter (C-shell scripts) command language interpreter (Korn-shell scripts) command language interpreter (Borne-shell scripts) Compaq(HP) Fortran 77 compiler Compaq(HP) Fortran 90/95 compiler convert fortran source code to C source code Compaq(HP) ANSI 89 standard C compiler Compaq(HP) C++ compiler GNU C compiler GNU C++ compiler Compaq(HP) Pascal compiler command-line symbolic debugger for compiled C or Fortran X Window symbolic debugger for compiled C or Fortran

make gmake cflow error lapack X dbm xdr netcdf mt dd tar ltf supcrt92 diagram

recompile programs from modified source GNU version of make utility generate C flow graph analyze and disperse compiler error messages

Programming libraries (see man library_name)


Fortran 77 routines for numerical linear algebra (supersedes LINPACK and EISPACK) routines to interface with X window system (no man page -- get the X Toolkit book) database routines library routines for external data representation routines for machine independent data representation

Tape manipulation and archiving


manipulate tape drive and position tape unformatted tape read and write; file conversion archive disk files on tape or disk read/write ANSI standard label tapes

Geology programs
thermodynamic properties of high P/T reactions calculate activity phase diagrams from log K values

You might also like