Linux command
tcsh 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start an interactive tcsh shell
tcsh
Execute a command
tcsh -c "[command]"
Run a script
tcsh [script.csh]
Start as a login shell
tcsh -l
Start without reading startup files
tcsh -f
Parse commands without executing
tcsh -n [script.csh]
Enable verbose mode
tcsh -v
说明
tcsh is an enhanced version of the Berkeley C shell (csh). It provides a command-line editor, programmable word completion, spelling correction, history mechanism, job control, and C-like syntax. Interactive shells read ~/.tcshrc (or ~/.cshrc) on startup. Login shells additionally read ~/.login and execute ~/.logout on exit. The shell supports command history with ! syntax, aliases, and shell variables. Features include filename completion with Tab, command history editing, directory stack manipulation with pushd/popd, and programmable completions for commands and arguments.
参数
- -c _command_
- Read commands from the following argument string.
- -e
- Exit immediately if a command exits with non-zero status.
- -f
- Fast start; do not read ~/.tcshrc or ~/.cshrc startup files.
- -i
- Force interactive mode even if input is not a terminal.
- -l
- Act as a login shell; read .login and .logout files.
- -n
- Parse commands but do not execute them (for debugging scripts).
- -s
- Read command input from standard input.
- -t
- Read and execute a single line of input.
- -v
- Set verbose mode; echo commands after history substitution.
- -x
- Set echo mode; echo commands before execution.
- -V
- Set verbose mode before reading ~/.tcshrc.
- -X
- Set echo mode before reading ~/.tcshrc.
- -b
- Force a break from option processing.
- -m
- Load ~/.tcshrc even if it doesn't belong to the effective user.
- -q
- Accept SIGQUIT; for use under a debugger with job control disabled.
- --help
- Print help message and exit.
- --version
- Print version information and exit.
FAQ
What is the tcsh command used for?
tcsh is an enhanced version of the Berkeley C shell (csh). It provides a command-line editor, programmable word completion, spelling correction, history mechanism, job control, and C-like syntax. Interactive shells read ~/.tcshrc (or ~/.cshrc) on startup. Login shells additionally read ~/.login and execute ~/.logout on exit. The shell supports command history with ! syntax, aliases, and shell variables. Features include filename completion with Tab, command history editing, directory stack manipulation with pushd/popd, and programmable completions for commands and arguments.
How do I run a basic tcsh example?
Run `tcsh` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c _command_ do in tcsh?
Read commands from the following argument string.