O'Reilly logo

Unix in a Nutshell, 4th Edition by Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Syntax

This section describes the syntax used by tcsh . The topics are arranged as follows:

  • Special files

  • Filename metacharacters

  • Quoting

  • Command forms

  • Redirection forms

Special Files

Filename

Description

/etc/csh.cshrc

Read by any shell before reading per-user initialization files.

~/.tcshrc or ~/.cshrc

Executed at each instance of shell startup. If no ~/.tcshrc is found, tcsh tries ~/.cshrc.

/etc/csh.login

Read by login shell before reading per-user initialization files.

~/.login

Executed by login shell after .tcshrc.

~/.cshdirs

Used to reload the directory stack after executing ~/.login. (See the savedirs variable.)

~/.history

History list saved from previous login.

/etc/csh.logout

Executed by login shell at logout, before ~/.logout.

~/.logout

Executed by login shell at logout.

/etc/passwd

Source of home directories for ~ name abbreviations. (May come from NIS or NIS+ instead.)

Example startup files are available from http://tcshrc.sourceforge.net.

Filename Metacharacters

Metacharacters

Meaning

*

Match any string of zero or more characters.

?

Match any single character.

[ abc ...]

Match any one of the enclosed characters; a hyphen can be used to specify a range (e.g., a-z, A-Z, 0–9).

[^abc...]

Match any character not enclosed as above.

{abc,xxx,...}

Expand each comma-separated string inside braces. The strings need not match actual filenames.

~

Home directory for the current user.

~ name

Home directory of user name.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required