In this chapter, I explain and
The information in this section is presented in the form of several sample Linux command sessions and a small project.
This section introduces the following shell commands, listed in alphabetical order:
The C shell is available on Linux as /bin/tcsh, and is completely compatible with the UNIX C shell with some enhancements of its own. A link from /bin/csh to /bin/tcsh is provided, so UNIX users can reference it as csh .
The C shell supports all of the
The C shell is a regular C program whose executable file is stored as "/bin/tcsh". If your
When a C shell is started as a login shell, a global login initialization file, "/etc/login" may also be executed. This is useful for setting up environment
When a C shell is invoked, the startup sequence is different for login shells and nonlogin
Figure 8-1. C shell startup sequence.
Note that the ".tcshrc" (or if not found, ".cshrc") file is run before either type of login initialization file. This may seem counterintuitive and has been the cause of much unexpected behavior when users are
Once an interactive shell starts and finishes running all the appropriate initialization files, it displays its prompt and awaits
The ".login" file typically contains commands that set environment variables such as
echo -n "Enter your terminal type (default is vt100): " set termtype = $< set term = vt100 if ("$termtype" != "") set term = "$termtype" unset termtype set path=(. /bin /usr/bin /usr/local/bin ) stty erase "^?" kill "^U" intr "^C" eof "^D" crt crterase set cdpath = (~) set history = 40 set notify set prompt = "! % " set savehist = 32
The ".tcshrc" file
alias h history alias ll ls -l alias ls ls -F alias rm rm -i alias m more