73 .\" which aren't already used herein. |
73 .\" which aren't already used herein. |
74 .\" |
74 .\" |
75 .\" modified to reference existing Solaris man pages, to add the Solaris |
75 .\" modified to reference existing Solaris man pages, to add the Solaris |
76 .\" stability classification, and to add a note about source availability. |
76 .\" stability classification, and to add a note about source availability. |
77 .\" |
77 .\" |
78 .TH TCSH 1 "10 July 2009" "Astron 6.17.00" |
78 .TH TCSH 1 "14 February 2012" "Astron 6.18.01" |
79 .SH NAME |
79 .SH NAME |
80 tcsh \- C shell with file name completion and command line editing |
80 tcsh \- C shell with file name completion and command line editing |
81 .SH SYNOPSIS |
81 .SH SYNOPSIS |
82 .B tcsh \fR[\fB\-bcdefFimnqstvVxX\fR] [\fB\-Dname\fR[\fB=value\fR]] [arg ...] |
82 .B tcsh \fR[\fB\-bcdefFimnqstvVxX\fR] [\fB\-Dname\fR[\fB=value\fR]] [arg ...] |
83 .br |
83 .br |
445 .PP |
445 .PP |
446 would list all three files, because case is ignored and hyphens and |
446 would list all three files, because case is ignored and hyphens and |
447 underscores are equivalent. Periods, however, are not equivalent to |
447 underscores are equivalent. Periods, however, are not equivalent to |
448 hyphens or underscores. |
448 hyphens or underscores. |
449 .PP |
449 .PP |
|
450 If the \fBcomplete\fR shell variable is set to `Enhance', completion |
|
451 ignores case and differences between a hyphen and an underscore word |
|
452 separator only when the user types a lowercase character or a hyphen. |
|
453 Entering an uppercase character or an underscore will not match the |
|
454 corresponding lowercase character or hyphen word separator. |
|
455 Typing `rm a\-\-file[^D]' in the directory of the previous example would |
|
456 still list all three files, but typing `rm A\-\-file' would match only |
|
457 `A_silly_file' and typing `rm a__file[^D]' would match just `A_silly_file' |
|
458 and `another_silly_file' because the user explicitly used an uppercase |
|
459 or an underscore character. |
|
460 .PP |
450 Completion and listing are affected by several other shell variables: |
461 Completion and listing are affected by several other shell variables: |
451 \fBrecexact\fR can be set to complete on the shortest possible unique |
462 \fBrecexact\fR can be set to complete on the shortest possible unique |
452 match, even if more typing might result in a longer match: |
463 match, even if more typing might result in a longer match: |
453 .IP "" 4 |
464 .IP "" 4 |
454 > ls |
465 > ls |
610 Expands the glob-pattern to the left of the cursor. |
621 Expands the glob-pattern to the left of the cursor. |
611 See \fBFilename substitution\fR. |
622 See \fBFilename substitution\fR. |
612 .TP 8 |
623 .TP 8 |
613 .B expand-line \fR(not bound) |
624 .B expand-line \fR(not bound) |
614 Like \fIexpand-history\fR, but |
625 Like \fIexpand-history\fR, but |
615 expands history substitutions in each word in the input buffer, |
626 expands history substitutions in each word in the input buffer. |
616 .TP 8 |
627 .TP 8 |
617 .B expand-variables \fR(^X-$) |
628 .B expand-variables \fR(^X-$) |
618 Expands the variable to the left of the cursor. |
629 Expands the variable to the left of the cursor. |
619 See \fBVariable substitution\fR. |
630 See \fBVariable substitution\fR. |
620 .TP 8 |
631 .TP 8 |
861 If the \fBhistlit\fR shell variable is set, commands that display and store |
872 If the \fBhistlit\fR shell variable is set, commands that display and store |
862 history use the literal form. |
873 history use the literal form. |
863 .PP |
874 .PP |
864 The \fIhistory\fR builtin command can print, store in a file, restore |
875 The \fIhistory\fR builtin command can print, store in a file, restore |
865 and clear the history list at any time, |
876 and clear the history list at any time, |
866 and the \fBsavehist\fR and \fBhistfile\fR shell variables can be can be set to |
877 and the \fBsavehist\fR and \fBhistfile\fR shell variables can be set to |
867 store the history list automatically on logout and restore it on login. |
878 store the history list automatically on logout and restore it on login. |
868 .PP |
879 .PP |
869 History substitutions introduce words from the history list into the input |
880 History substitutions introduce words from the history list into the input |
870 stream, making it easy to repeat commands, repeat arguments of a previous |
881 stream, making it easy to repeat commands, repeat arguments of a previous |
871 command in the current command, or fix spelling mistakes in the previous |
882 command in the current command, or fix spelling mistakes in the previous |
1151 \fIset\fR and \fIunset\fR commands. |
1162 \fIset\fR and \fIunset\fR commands. |
1152 The system maintains its own list of ``environment'' variables. |
1163 The system maintains its own list of ``environment'' variables. |
1153 These can be displayed and changed with \fIprintenv\fR, \fIsetenv\fR and |
1164 These can be displayed and changed with \fIprintenv\fR, \fIsetenv\fR and |
1154 \fIunsetenv\fR. |
1165 \fIunsetenv\fR. |
1155 .PP |
1166 .PP |
1156 (+) Variables may be made read-only with `set \-r' (q.v.) |
1167 (+) Variables may be made read-only with `set \-r' (q.v.). |
1157 Read-only variables may not be modified or unset; |
1168 Read-only variables may not be modified or unset; |
1158 attempting to do so will cause an error. |
1169 attempting to do so will cause an error. |
1159 Once made read-only, a variable cannot be made writable, |
1170 Once made read-only, a variable cannot be made writable, |
1160 so `set \-r' should be used with caution. |
1171 so `set \-r' should be used with caution. |
1161 Environment variables cannot be made read-only. |
1172 Environment variables cannot be made read-only. |
1329 replaced with an alphabetically sorted list of file names which match the |
1340 replaced with an alphabetically sorted list of file names which match the |
1330 pattern. |
1341 pattern. |
1331 .PP |
1342 .PP |
1332 In matching filenames, the character `.' at the beginning of a filename or |
1343 In matching filenames, the character `.' at the beginning of a filename or |
1333 immediately following a `/', as well as the character `/' must be matched |
1344 immediately following a `/', as well as the character `/' must be matched |
1334 explicitly. The character `*' matches any string of characters, including the |
1345 explicitly (unless either |
1335 null string. The character `?' matches any single character. The sequence |
1346 .B globdot |
1336 `[...]' matches any one of the characters enclosed. Within `[...]', a pair of |
1347 or |
|
1348 .B globstar |
|
1349 or both are set(+)). The character `*' matches any string of characters, |
|
1350 including the null string. The character `?' matches any single character. |
|
1351 The sequence `[...]' matches any one of the characters enclosed. |
|
1352 Within `[...]', a pair of |
1337 characters separated by `\-' matches any character lexically between the two. |
1353 characters separated by `\-' matches any character lexically between the two. |
1338 .PP |
1354 .PP |
1339 (+) Some glob-patterns can be negated: |
1355 (+) Some glob-patterns can be negated: |
1340 The sequence `[^...]' matches any single character \fInot\fR specified by the |
1356 The sequence `[^...]' matches any single character \fInot\fR specified by the |
1341 characters and/or ranges of characters in the braces. |
1357 characters and/or ranges of characters in the braces. |
|
1358 |
1342 .PP |
1359 .PP |
1343 An entire glob-pattern can also be negated with `^': |
1360 An entire glob-pattern can also be negated with `^': |
1344 .IP "" 4 |
1361 .IP "" 4 |
1345 > echo * |
1362 > echo * |
1346 .br |
1363 .br |
1381 glob-patterns must match a file (so that, e.g., `rm *.a *.c *.o' would fail |
1398 glob-patterns must match a file (so that, e.g., `rm *.a *.c *.o' would fail |
1382 only if there were no files in the current directory ending in `.a', `.c', or |
1399 only if there were no files in the current directory ending in `.a', `.c', or |
1383 `.o'), and if the \fBnonomatch\fR shell variable is set a pattern (or list |
1400 `.o'), and if the \fBnonomatch\fR shell variable is set a pattern (or list |
1384 of patterns) which matches nothing is left unchanged rather than causing |
1401 of patterns) which matches nothing is left unchanged rather than causing |
1385 an error. |
1402 an error. |
|
1403 .PP |
|
1404 The \fBglobstar\fR shell variable can be set to allow `**' or `***' as |
|
1405 a file glob pattern that matches any string of characters including `/', |
|
1406 recursively traversing any existing sub-directories. For example, |
|
1407 `ls **.c' will list all the .c files in the current directory tree. |
|
1408 If used by itself, it will match match zero or more sub-directories |
|
1409 (e.g. `ls /usr/include/**/time.h' will list any file named `time.h' |
|
1410 in the /usr/include directory tree; `ls /usr/include/**time.h' will match |
|
1411 any file in the /usr/include directory tree ending in `time.h'; and |
|
1412 `ls /usr/include/**time**.h' will match any .h file with `time' either |
|
1413 in a subdirectory name or in the filename itself). |
|
1414 To prevent problems with recursion, the `**' glob-pattern will not |
|
1415 descend into a symbolic link containing a directory. To override this, |
|
1416 use `***' (+) |
1386 .PP |
1417 .PP |
1387 The \fBnoglob\fR shell variable can be set to prevent filename substitution, |
1418 The \fBnoglob\fR shell variable can be set to prevent filename substitution, |
1388 and the \fIexpand-glob\fR editor command, normally bound to `^X-*', can be |
1419 and the \fIexpand-glob\fR editor command, normally bound to `^X-*', can be |
1389 used to interactively expand individual filename substitutions. |
1420 used to interactively expand individual filename substitutions. |
1390 .SS "Directory stack substitution (+)" |
1421 .SS "Directory stack substitution (+)" |
1502 a new shell is spawned to read it. The \fIshell\fR special alias may be set |
1533 a new shell is spawned to read it. The \fIshell\fR special alias may be set |
1503 to specify an interpreter other than the shell itself. |
1534 to specify an interpreter other than the shell itself. |
1504 .PP |
1535 .PP |
1505 On systems which do not understand the `#!' script interpreter convention |
1536 On systems which do not understand the `#!' script interpreter convention |
1506 the shell may be compiled to emulate it; see the \fBversion\fR shell |
1537 the shell may be compiled to emulate it; see the \fBversion\fR shell |
1507 variable\fR. If so, the shell checks the first line of the file to |
1538 variable. If so, the shell checks the first line of the file to |
1508 see if it is of the form `#!\fIinterpreter\fR \fIarg\fR ...'. If it is, |
1539 see if it is of the form `#!\fIinterpreter\fR \fIarg\fR ...'. If it is, |
1509 the shell starts \fIinterpreter\fR with the given \fIarg\fRs and feeds the |
1540 the shell starts \fIinterpreter\fR with the given \fIarg\fRs and feeds the |
1510 file to it on standard input. |
1541 file to it on standard input. |
1511 .SS Input/output |
1542 .SS Input/output |
1512 The standard input and standard output of a command may be redirected with the |
1543 The standard input and standard output of a command may be redirected with the |
1731 \fBLr\fR, \fBLw\fR and \fBLx\fR are always true for links and false for |
1762 \fBLr\fR, \fBLw\fR and \fBLx\fR are always true for links and false for |
1732 non-links. \fBL\fR has a different meaning when it is the last operator |
1763 non-links. \fBL\fR has a different meaning when it is the last operator |
1733 in a multiple-operator test; see below. |
1764 in a multiple-operator test; see below. |
1734 .PP |
1765 .PP |
1735 It is possible but not useful, and sometimes misleading, to combine operators |
1766 It is possible but not useful, and sometimes misleading, to combine operators |
1736 which expect \fIfile\fR to be a file with operators which do not, |
1767 which expect \fIfile\fR to be a file with operators which do not |
1737 (e.g., \fBX\fR and \fBt\fR). Following \fBL\fR with a non-file operator |
1768 (e.g., \fBX\fR and \fBt\fR). Following \fBL\fR with a non-file operator |
1738 can lead to particularly strange results. |
1769 can lead to particularly strange results. |
1739 .PP |
1770 .PP |
1740 Other operators return other information, i.e., not just `0' or `1'. (+) |
1771 Other operators return other information, i.e., not just `0' or `1'. (+) |
1741 They have the same format as before; \fIop\fR may be one of |
1772 They have the same format as before; \fIop\fR may be one of |
2262 see the \fBversion\fR shell variable. |
2293 see the \fBversion\fR shell variable. |
2263 .TP 8 |
2294 .TP 8 |
2264 .B case \fIlabel\fB: |
2295 .B case \fIlabel\fB: |
2265 A label in a \fIswitch\fR statement as discussed below. |
2296 A label in a \fIswitch\fR statement as discussed below. |
2266 .TP 8 |
2297 .TP 8 |
2267 .B cd \fR[\fB\-p\fR] [\fB\-l\fR] [\fB\-n\fR|\fB\-v\fR] [\fIname\fR] |
2298 .B cd \fR[\fB\-p\fR] [\fB\-l\fR] [\fB\-n\fR|\fB\-v\fR] [\I--\fR] [\fIname\fR] |
2268 If a directory \fIname\fR is given, changes the shell's working directory |
2299 If a directory \fIname\fR is given, changes the shell's working directory |
2269 to \fIname\fR. If not, changes to \fBhome\fR. |
2300 to \fIname\fR. If not, changes to \fBhome\fR. |
2270 If \fIname\fR is `\-' it is interpreted as the previous working directory |
2301 If \fIname\fR is `\-' it is interpreted as the previous working directory |
2271 (see \fBOther substitutions\fR). (+) |
2302 (see \fBOther substitutions\fR). (+) |
2272 If \fIname\fR is not a subdirectory of the current directory |
2303 If \fIname\fR is not a subdirectory of the current directory |
2277 .RS +8 |
2308 .RS +8 |
2278 .PP |
2309 .PP |
2279 With \fB\-p\fR, prints the final directory stack, just like \fIdirs\fR. |
2310 With \fB\-p\fR, prints the final directory stack, just like \fIdirs\fR. |
2280 The \fB\-l\fR, \fB\-n\fR and \fB\-v\fR flags have the same effect on \fIcd\fR |
2311 The \fB\-l\fR, \fB\-n\fR and \fB\-v\fR flags have the same effect on \fIcd\fR |
2281 as on \fIdirs\fR, and they imply \fB\-p\fR. (+) |
2312 as on \fIdirs\fR, and they imply \fB\-p\fR. (+) |
|
2313 Using \fB\-\-\fR forces a break from option processing so the next word |
|
2314 is taken as the directory \fIname\fR even if it begins with '\-'. (+) |
2282 .PP |
2315 .PP |
2283 See also the \fBimplicitcd\fR shell variable. |
2316 See also the \fBimplicitcd\fR shell variable. |
2284 .RE |
2317 .RE |
2285 .TP 8 |
2318 .TP 8 |
2286 .B chdir |
2319 .B chdir |
2812 .B hup \fR[\fIcommand\fR] \fR(+) |
2845 .B hup \fR[\fIcommand\fR] \fR(+) |
2813 With \fIcommand\fR, runs \fIcommand\fR such that it will exit on a hangup |
2846 With \fIcommand\fR, runs \fIcommand\fR such that it will exit on a hangup |
2814 signal and arranges for the shell to send it a hangup signal when the shell |
2847 signal and arranges for the shell to send it a hangup signal when the shell |
2815 exits. |
2848 exits. |
2816 Note that commands may set their own response to hangups, overriding \fIhup\fR. |
2849 Note that commands may set their own response to hangups, overriding \fIhup\fR. |
2817 Without an argument (allowed in only a shell script), causes the shell to |
2850 Without an argument, causes the non-interactive shell only to |
2818 exit on a hangup for the remainder of the script. |
2851 exit on a hangup for the remainder of the script. |
2819 See also \fBSignal handling\fR and the \fInohup\fR builtin command. |
2852 See also \fBSignal handling\fR and the \fInohup\fR builtin command. |
2820 .TP 8 |
2853 .TP 8 |
2821 .B if (\fIexpr\fB) \fIcommand |
2854 .B if (\fIexpr\fB) \fIcommand |
2822 If \fIexpr\fR (an expression, as described under \fBExpressions\fR) |
2855 If \fIexpr\fR (an expression, as described under \fBExpressions\fR) |
2912 .TP |
2945 .TP |
2913 \fImemoryuse\fR |
2946 \fImemoryuse\fR |
2914 the maximum amount of physical memory a process |
2947 the maximum amount of physical memory a process |
2915 may have allocated to it at a given time |
2948 may have allocated to it at a given time |
2916 .TP |
2949 .TP |
|
2950 \fIvmemoryuse\fR |
|
2951 the maximum amount of virtual memory a process |
|
2952 may have allocated to it at a given time (address space) |
|
2953 .TP |
|
2954 \fIvmemoryuse\fR |
|
2955 the maximum amount of virtual memory a process |
|
2956 may have allocated to it at a given time |
|
2957 .TP |
2917 \fIheapsize\fR |
2958 \fIheapsize\fR |
2918 the maximum amount of memory a process |
2959 the maximum amount of memory a process |
2919 may allocate per \fIbrk()\fR system call |
2960 may allocate per \fIbrk()\fR system call |
2920 .TP |
2961 .TP |
2921 \fIdescriptors\fR or \fIopenfiles\fR |
2962 \fIdescriptors\fR or \fIopenfiles\fR |
2930 \fImaxproc\fR |
2971 \fImaxproc\fR |
2931 the maximum number of simultaneous processes for this user id |
2972 the maximum number of simultaneous processes for this user id |
2932 .TP |
2973 .TP |
2933 \fIsbsize\fR |
2974 \fIsbsize\fR |
2934 the maximum size of socket buffer usage for this user |
2975 the maximum size of socket buffer usage for this user |
|
2976 .TP |
|
2977 \fIswapsize\fR |
|
2978 the maximum amount of swap space reserved or used for this user |
|
2979 .TP |
|
2980 \fImaxlocks\fR |
|
2981 the maximum number of locks for this user |
|
2982 .TP |
|
2983 \fImaxsignal\fR |
|
2984 the maximum number of pending signals for this user |
|
2985 .TP |
|
2986 \fImaxmessage\fR |
|
2987 the maximum number of bytes in POSIX mqueues for this user |
|
2988 .TP |
|
2989 \fImaxnice\fR |
|
2990 the maximum nice priority the user is allowed to raise mapped from [19...-20] |
|
2991 to [0...39] for this user |
|
2992 .TP |
|
2993 \fImaxrtprio\fR |
|
2994 the maximum realtime priority for this user |
|
2995 \fImaxrttime\fR |
|
2996 the timeout for RT tasks in microseconds for this user. |
2935 .PP |
2997 .PP |
2936 \fImaximum-use\fR may be given as a (floating point or |
2998 \fImaximum-use\fR may be given as a (floating point or |
2937 integer) number followed by a scale factor. For all limits |
2999 integer) number followed by a scale factor. For all limits |
2938 other than \fIcputime\fR the default scale is `k' or `kilobytes' |
3000 other than \fIcputime\fR the default scale is `k' or `kilobytes' |
2939 (1024 bytes); a scale factor of `m' or `megabytes' may also |
3001 (1024 bytes); a scale factor of `m' or `megabytes' or `g' or `gigabytes' |
2940 be used. For \fIcputime\fR the default scaling is `seconds', |
3002 may also be used. For \fIcputime\fR the default scaling is `seconds', |
2941 while `m' for minutes or `h' for hours, or a time of the |
3003 while `m' for minutes or `h' for hours, or a time of the |
2942 form `mm:ss' giving minutes and seconds may be used. |
3004 form `mm:ss' giving minutes and seconds may be used. |
|
3005 .PP |
|
3006 If \fImaximum-use\fR is `unlimited', |
|
3007 then the limitation on the specified \fIresource\fR |
|
3008 is removed (this is equivalent to the \fIunlimit\fR builtin command). |
2943 .PP |
3009 .PP |
2944 For both \fIresource\fR names and scale factors, unambiguous |
3010 For both \fIresource\fR names and scale factors, unambiguous |
2945 prefixes of the names suffice. |
3011 prefixes of the names suffice. |
2946 .RE |
3012 .RE |
2947 .TP 8 |
3013 .TP 8 |
3019 unless \fBlistflags\fR contains an `x', in which case it acts like `ls \-xF'. |
3085 unless \fBlistflags\fR contains an `x', in which case it acts like `ls \-xF'. |
3020 \fIls\-F\fR passes its arguments to \fIls\fR(1) if it is given any switches, |
3086 \fIls\-F\fR passes its arguments to \fIls\fR(1) if it is given any switches, |
3021 so `alias ls ls\-F' generally does the right thing. |
3087 so `alias ls ls\-F' generally does the right thing. |
3022 .PP |
3088 .PP |
3023 The \fBls\-F\fR builtin can list files using different colors depending on the |
3089 The \fBls\-F\fR builtin can list files using different colors depending on the |
3024 filetype or extension. See the \fBcolor\fR \fItcsh\fR variable and the |
3090 filetype or extension. See the \fBcolor\fR shell variable and the |
3025 \fBLS_COLORS\fR environment variable. |
3091 \fBLS_COLORS\fR environment variable. |
3026 .RE |
3092 .RE |
3027 .PP |
3093 .PP |
3028 .B migrate \fR[\fB\-\fIsite\fR] \fIpid\fR|\fB%\fIjobid\fR ... (+) |
3094 .B migrate \fR[\fB\-\fIsite\fR] \fIpid\fR|\fB%\fIjobid\fR ... (+) |
3029 .PD 0 |
3095 .PD 0 |
3035 current process to the specified site. Migrating the shell |
3101 current process to the specified site. Migrating the shell |
3036 itself can cause unexpected behavior, because the shell |
3102 itself can cause unexpected behavior, because the shell |
3037 does not like to lose its tty. (TCF only) |
3103 does not like to lose its tty. (TCF only) |
3038 .PD |
3104 .PD |
3039 .TP 8 |
3105 .TP 8 |
3040 .B newgrp \fR[\fB\-\fR] \fIgroup\fR (+) |
3106 .B newgrp \fR[\fB\-\fR] \fI[group]\fR (+) |
3041 Equivalent to `exec newgrp'; see \fInewgrp\fR(1). |
3107 Equivalent to `exec newgrp'; see \fInewgrp\fR(1). |
3042 Available only if the shell was so compiled; |
3108 Available only if the shell was so compiled; |
3043 see the \fBversion\fR shell variable. |
3109 see the \fBversion\fR shell variable. |
3044 .TP 8 |
3110 .TP 8 |
3045 .B nice \fR[\fB+\fInumber\fR] [\fIcommand\fR] |
3111 .B nice \fR[\fB+\fInumber\fR] [\fIcommand\fR] |
3053 commands in simple \fIif\fR statements apply. |
3119 commands in simple \fIif\fR statements apply. |
3054 .TP 8 |
3120 .TP 8 |
3055 .B nohup \fR[\fIcommand\fR] |
3121 .B nohup \fR[\fIcommand\fR] |
3056 With \fIcommand\fR, runs \fIcommand\fR such that it will ignore hangup signals. |
3122 With \fIcommand\fR, runs \fIcommand\fR such that it will ignore hangup signals. |
3057 Note that commands may set their own response to hangups, overriding \fInohup\fR. |
3123 Note that commands may set their own response to hangups, overriding \fInohup\fR. |
3058 Without an argument (allowed in only a shell script), causes the shell to |
3124 Without an argument, causes the non-interactive shell only to |
3059 ignore hangups for the remainder of the script. |
3125 ignore hangups for the remainder of the script. |
3060 See also \fBSignal handling\fR and the \fIhup\fR builtin command. |
3126 See also \fBSignal handling\fR and the \fIhup\fR builtin command. |
3061 .TP 8 |
3127 .TP 8 |
3062 .B notify \fR[\fB%\fIjob\fR ...] |
3128 .B notify \fR[\fB%\fIjob\fR ...] |
3063 Causes the shell to notify the user asynchronously when the status of any |
3129 Causes the shell to notify the user asynchronously when the status of any |
3116 as on \fIdirs\fR. (+) |
3182 as on \fIdirs\fR. (+) |
3117 .TP 8 |
3183 .TP 8 |
3118 .B rehash |
3184 .B rehash |
3119 Causes the internal hash table of the contents of the |
3185 Causes the internal hash table of the contents of the |
3120 directories in the \fBpath\fR variable to be recomputed. This is |
3186 directories in the \fBpath\fR variable to be recomputed. This is |
3121 needed if new commands are added to directories in \fBpath\fR |
3187 needed if the \fBautorehash\fR shell variable is not set and new |
3122 while you are logged in. This should be necessary only if |
3188 commands are added to directories in \fBpath\fR while you are logged |
3123 you add commands to one of your own directories, or if a |
3189 in. With \fBautorehash\fR, a new command will be found |
3124 systems programmer changes the contents of one of the |
3190 automatically, except in the special case where another command of |
3125 system directories. Also flushes the cache of home directories |
3191 the same name which is located in a different directory already |
|
3192 exists in the hash table. Also flushes the cache of home directories |
3126 built by tilde expansion. |
3193 built by tilde expansion. |
3127 .TP 8 |
3194 .TP 8 |
3128 .B repeat \fIcount command |
3195 .B repeat \fIcount command |
3129 The specified \fIcommand\fR, |
3196 The specified \fIcommand\fR, |
3130 which is subject to the same restrictions as the \fIcommand\fR |
3197 which is subject to the same restrictions as the \fIcommand\fR |
3215 parenthesized word list. |
3282 parenthesized word list. |
3216 The second form sets \fIname\fR to the null string. |
3283 The second form sets \fIname\fR to the null string. |
3217 The third form sets \fIname\fR to the single \fIword\fR. |
3284 The third form sets \fIname\fR to the single \fIword\fR. |
3218 The fourth form sets \fIname\fR to the list of words in |
3285 The fourth form sets \fIname\fR to the list of words in |
3219 \fIwordlist\fR. In all cases the value is command and filename expanded. |
3286 \fIwordlist\fR. In all cases the value is command and filename expanded. |
3220 If \-r is specified, the value is set read-only. If \-f or \-l are |
3287 If \fB\-r\fR is specified, the value is set read-only. If \fB\-f\fR or |
3221 specified, set only unique words keeping their order. |
3288 \fB\-l\fR are specified, set only unique words keeping their order. |
3222 \-f prefers the first occurrence of a word, and \-l the last. |
3289 \fB\-f\fR prefers the first occurrence of a word, and \fB\-l\fR the last. |
3223 The fifth form sets the \fIindex\fR'th component of name to \fIword\fR; |
3290 The fifth form sets the \fIindex\fR'th component of \fIname\fR to \fIword\fR; |
3224 this component must already exist. |
3291 this component must already exist. |
3225 The sixth form lists only the names of all shell variables that are read-only. |
3292 The sixth form lists only the names of all shell variables that are read-only. |
3226 The seventh form makes \fIname\fR read-only, whether or not it has a value. |
3293 The seventh form makes \fIname\fR read-only, whether or not it has a value. |
3227 The second form sets \fIname\fR to the null string. |
|
3228 The eighth form is the same as the third form, but |
3294 The eighth form is the same as the third form, but |
3229 make \fIname\fR read-only at the same time. |
3295 make \fIname\fR read-only at the same time. |
3230 .PD |
3296 .PD |
3231 .IP "" 8 |
3297 .IP "" 8 |
3232 These arguments can be repeated to set and/or make read-only multiple variables |
3298 These arguments can be repeated to set and/or make read-only multiple variables |
3358 Common values for the mask are |
3424 Common values for the mask are |
3359 002, giving all access to the group and read and execute access to others, and |
3425 002, giving all access to the group and read and execute access to others, and |
3360 022, giving read and execute access to the group and others. |
3426 022, giving read and execute access to the group and others. |
3361 Without \fIvalue\fR, prints the current file creation mask. |
3427 Without \fIvalue\fR, prints the current file creation mask. |
3362 .TP 8 |
3428 .TP 8 |
3363 .B unalias \fIpattern |
3429 .B unalias \fIpattern\fR |
3364 .br |
3430 .br |
3365 Removes all aliases whose names match \fIpattern\fR. |
3431 Removes all aliases whose names match \fIpattern\fR. |
3366 `unalias *' thus removes all aliases. |
3432 `unalias *' thus removes all aliases. |
3367 It is not an error for nothing to be \fIunalias\fRed. |
3433 It is not an error for nothing to be \fIunalias\fRed. |
3368 .TP 8 |
3434 .TP 8 |
3588 .TP 8 |
3654 .TP 8 |
3589 .B autologout \fR(+) |
3655 .B autologout \fR(+) |
3590 The first word is the number of minutes of inactivity before automatic |
3656 The first word is the number of minutes of inactivity before automatic |
3591 logout. The optional second word is the number of minutes of inactivity |
3657 logout. The optional second word is the number of minutes of inactivity |
3592 before automatic locking. |
3658 before automatic locking. |
3593 When the shell automatically logs out, |
3659 When the shell automatically logs out, it prints `auto-logout', sets the |
3594 it prints `auto-logout', sets the variable logout to `automatic' and exits. |
3660 variable \fBlogout\fR to `automatic' and exits. |
3595 When the shell automatically locks, the user is required to enter his password |
3661 When the shell automatically locks, the user is required to enter his password |
3596 to continue working. Five incorrect attempts result in automatic logout. |
3662 to continue working. Five incorrect attempts result in automatic logout. |
3597 Set to `60' (automatic logout after 60 minutes, and no locking) by default |
3663 Set to `60' (automatic logout after 60 minutes, and no locking) by default |
3598 in login and superuser shells, but not if the shell thinks it is running |
3664 in login and superuser shells, but not if the shell thinks it is running |
3599 under a window system (i.e., the \fBDISPLAY\fR environment variable is set), |
3665 under a window system (i.e., the \fBDISPLAY\fR environment variable is set), |
3600 the tty is a pseudo-tty (pty) or the shell was not so compiled (see the |
3666 the tty is a pseudo-tty (pty) or the shell was not so compiled (see the |
3601 \fBversion\fR shell variable). |
3667 \fBversion\fR shell variable). |
3602 See also the \fBafsuser\fR and \fBlogout\fR shell variables. |
3668 See also the \fBafsuser\fR and \fBlogout\fR shell variables. |
3603 .TP 8 |
3669 .TP 8 |
|
3670 .B autorehash \fR(+) |
|
3671 If set, the internal hash table of the contents of the directories in the |
|
3672 \fBpath\fR variable will be recomputed if a command is not found in the hash |
|
3673 table. In addition, the list of available commands will be rebuilt for each |
|
3674 command completion or spelling correction attempt if set to `complete' or |
|
3675 `correct' respectively; if set to `always', this will be done for both |
|
3676 cases. |
|
3677 .TP 8 |
3604 .B backslash_quote \fR(+) |
3678 .B backslash_quote \fR(+) |
3605 If set, backslashes (`\\') always quote `\\', `'', and `"'. This may make |
3679 If set, backslashes (`\\') always quote `\\', `'', and `"'. This may make |
3606 complex quoting tasks easier, but it can cause syntax errors in \fIcsh\fR(1) |
3680 complex quoting tasks easier, but it can cause syntax errors in \fIcsh\fR(1) |
3607 scripts. |
3681 scripts. |
3608 .TP 8 |
3682 .TP 8 |
3631 .B compat_expr \fR(+) |
3705 .B compat_expr \fR(+) |
3632 If set, the shell will evaluate expressions right to left, like the original |
3706 If set, the shell will evaluate expressions right to left, like the original |
3633 \fIcsh\fR. |
3707 \fIcsh\fR. |
3634 .TP 8 |
3708 .TP 8 |
3635 .B complete \fR(+) |
3709 .B complete \fR(+) |
3636 If set to `enhance', completion 1) ignores case and 2) considers |
3710 If set to `igncase', the completion becomes case insensitive. |
3637 periods, hyphens and underscores (`.', `\-' and `_') to be word |
3711 If set to `enhance', completion ignores case and considers |
3638 separators and hyphens and underscores to be equivalent. If set to |
3712 hyphens and underscores to be equivalent; it will also treat |
3639 `igncase', the completion becomes case insensitive. |
3713 periods, hyphens and underscores (`.', `\-' and `_') as word |
|
3714 separators. |
|
3715 If set to `Enhance', completion matches uppercase and underscore |
|
3716 characters explicitly and matches lowercase and hyphens in a |
|
3717 case-insensivite manner; it will treat periods, hypens and underscores |
|
3718 as word separators. |
3640 .TP 8 |
3719 .TP 8 |
3641 .B continue \fR(+) |
3720 .B continue \fR(+) |
3642 If set to a list of commands, the shell will continue the listed |
3721 If set to a list of commands, the shell will continue the listed |
3643 commands, instead of starting a new one. |
3722 commands, instead of starting a new one. |
3644 .TP 8 |
3723 .TP 8 |
3681 One can change the stack arbitrarily by setting \fBdirstack\fR, |
3760 One can change the stack arbitrarily by setting \fBdirstack\fR, |
3682 but the first element (the current working directory) is always correct. |
3761 but the first element (the current working directory) is always correct. |
3683 See also the \fBcwd\fR and \fBowd\fR shell variables. |
3762 See also the \fBcwd\fR and \fBowd\fR shell variables. |
3684 .TP 8 |
3763 .TP 8 |
3685 .B dspmbyte \fR(+) |
3764 .B dspmbyte \fR(+) |
3686 Has an affect iff 'dspm' is listed as part of the \fBversion\fR shell variable. |
3765 Has an effect iff 'dspm' is listed as part of the \fBversion\fR shell variable. |
3687 If set to `euc', it enables display and editing EUC-kanji(Japanese) code. |
3766 If set to `euc', it enables display and editing EUC-kanji(Japanese) code. |
3688 If set to `sjis', it enables display and editing Shift-JIS(Japanese) code. |
3767 If set to `sjis', it enables display and editing Shift-JIS(Japanese) code. |
3689 If set to `big5', it enables display and editing Big5(Chinese) code. |
3768 If set to `big5', it enables display and editing Big5(Chinese) code. |
3690 If set to `utf8', it enables display and editing Utf8(Unicode) code. |
3769 If set to `utf8', it enables display and editing Utf8(Unicode) code. |
3691 If set to the following format, it enables display and editing of original |
3770 If set to the following format, it enables display and editing of original |
3707 2 ... used for the second byte of a multi-byte character. |
3786 2 ... used for the second byte of a multi-byte character. |
3708 .br |
3787 .br |
3709 3 ... used for both the first byte and second byte of a multi-byte character. |
3788 3 ... used for both the first byte and second byte of a multi-byte character. |
3710 .\" SHK: I tried my best to get the following to be grammatically correct. |
3789 .\" SHK: I tried my best to get the following to be grammatically correct. |
3711 .\" However, I still don't understand what's going on here. In the |
3790 .\" However, I still don't understand what's going on here. In the |
3712 \" following example, there are three bytes, but the text seems to refer to |
3791 .\" following example, there are three bytes, but the text seems to refer to |
3713 \" each nybble as a character. What's going on here? It this 3-byte code |
3792 .\" each nybble as a character. What's going on here? It this 3-byte code |
3714 \" in the table? The text above seems to imply that there are 256 |
3793 .\" in the table? The text above seems to imply that there are 256 |
3715 \" characters/bytes in the table. If I get some more info on this (perhaps |
3794 .\" characters/bytes in the table. If I get some more info on this (perhaps |
3716 \" a complete example), I could fix the text to be grammatically correct. |
3795 .\" a complete example), I could fix the text to be grammatically correct. |
3717 \" ([email protected] 1999/09/13) |
3796 .\" ([email protected] 1999/09/13) |
3718 .PP |
3797 .PP |
3719 Example: |
3798 Example: |
3720 .br |
3799 .br |
3721 If set to `001322', the first character (means 0x00 of the ASCII code) and |
3800 If set to `001322', the first character (means 0x00 of the ASCII code) and |
3722 second character (means 0x01 of ASCII code) are set to `0'. Then, it is not |
3801 second character (means 0x01 of ASCII code) are set to `0'. Then, it is not |
3780 .B ellipsis \fR(+) |
3859 .B ellipsis \fR(+) |
3781 If set, the `%c'/`%.' and `%C' prompt sequences (see the \fBprompt\fR |
3860 If set, the `%c'/`%.' and `%C' prompt sequences (see the \fBprompt\fR |
3782 shell variable) indicate skipped directories with an ellipsis (`...') |
3861 shell variable) indicate skipped directories with an ellipsis (`...') |
3783 instead of `/<skipped>'. |
3862 instead of `/<skipped>'. |
3784 .TP 8 |
3863 .TP 8 |
|
3864 .B euid \fR(+) |
|
3865 The user's effective user ID. |
|
3866 .TP 8 |
|
3867 .B euser \fR(+) |
|
3868 The first matching passwd entry name corresponding to the effective user ID. |
|
3869 .TP 8 |
3785 .B fignore \fR(+) |
3870 .B fignore \fR(+) |
3786 Lists file name suffixes to be ignored by completion. |
3871 Lists file name suffixes to be ignored by completion. |
3787 .TP 8 |
3872 .TP 8 |
3788 .B filec |
3873 .B filec |
3789 In \fItcsh\fR, completion is always used and this variable is ignored |
3874 In \fItcsh\fR, completion is always used and this variable is ignored |
3793 If set in \fIcsh\fR, filename completion is used. |
3878 If set in \fIcsh\fR, filename completion is used. |
3794 .TP 8 |
3879 .TP 8 |
3795 .B gid \fR(+) |
3880 .B gid \fR(+) |
3796 The user's real group ID. |
3881 The user's real group ID. |
3797 .TP 8 |
3882 .TP 8 |
|
3883 .B globdot \fR(+) |
|
3884 If set, wild-card glob patterns will match files and directories beginning |
|
3885 with `.' except for `.' and `..' |
|
3886 .TP 8 |
|
3887 .B globstar \fR(+) |
|
3888 If set, the `**' and `***' file glob patterns will match any string of |
|
3889 characters including `/' traversing any existing sub-directories. (e.g. |
|
3890 `ls **.c' will list all the .c files in the current directory tree). |
|
3891 If used by itself, it will match match zero or more sub-directories |
|
3892 (e.g. `ls /usr/include/**/time.h' will list any file named `time.h' |
|
3893 in the /usr/include directory tree; whereas `ls /usr/include/**time.h' |
|
3894 will match any file in the /usr/include directory tree ending in `time.h'). |
|
3895 To prevent problems with recursion, the `**' glob-pattern will not |
|
3896 descend into a symbolic link containing a directory. To override this, |
|
3897 use `***' |
|
3898 .TP 8 |
3798 .B group \fR(+) |
3899 .B group \fR(+) |
3799 The user's group name. |
3900 The user's group name. |
3800 .TP 8 |
3901 .TP 8 |
3801 .B highlight |
3902 .B highlight |
3802 If set, the incremental search match (in \fIi-search-back\fR and |
3903 If set, the incremental search match (in \fIi-search-back\fR and |
3803 \fIi-search-fwd\fR) and the region between the mark and the cursor are |
3904 \fIi-search-fwd\fR) and the region between the mark and the cursor are |
3804 highlighted in reverse video. |
3905 highlighted in reverse video. |
3805 |
3906 .IP "" 8 |
3806 Highlighting requires more frequent terminal writes, which introduces extra |
3907 Highlighting requires more frequent terminal writes, which introduces extra |
3807 overhead. If you care about terminal performance, you may want to leave this |
3908 overhead. If you care about terminal performance, you may want to leave this |
3808 unset. |
3909 unset. |
3809 .TP 8 |
3910 .TP 8 |
3810 .B histchars |
3911 .B histchars |
3924 an automatic logout, and `hangup' if the shell was killed by a hangup |
4025 an automatic logout, and `hangup' if the shell was killed by a hangup |
3925 signal (see \fBSignal handling\fR). See also the \fBautologout\fR |
4026 signal (see \fBSignal handling\fR). See also the \fBautologout\fR |
3926 shell variable. |
4027 shell variable. |
3927 .TP 8 |
4028 .TP 8 |
3928 .B mail |
4029 .B mail |
3929 The names of the files or directories to check for incoming mail, |
4030 A list of files and directories to check for incoming mail, optionally |
3930 separated by whitespace, and optionally preceded by a numeric word. |
4031 preceded by a numeric word. Before each prompt, if 10 minutes have |
3931 Before each prompt, if 10 minutes have passed since the last check, the |
4032 passed since the last check, the shell checks each file and says `You |
3932 shell checks each file and says `You have new mail.' (or, if \fBmail\fR |
4033 have new mail.' (or, if \fBmail\fR contains multiple files, `You have |
3933 contains multiple files, `You have new mail in \fIname\fR.') if the |
4034 new mail in \fIname\fR.') if the filesize is greater than zero in size |
3934 filesize is greater than zero in size and has a modification time |
4035 and has a modification time greater than its access time. |
3935 greater than its access time. |
|
3936 .PP |
4036 .PP |
3937 .RS +8 |
4037 .RS +8 |
3938 .PD |
4038 .PD |
3939 .PP |
4039 .PP |
3940 If you are in a login shell, then no mail file is reported unless it has |
4040 If you are in a login shell, then no mail file is reported unless it has |
4009 The old working directory, equivalent to the `\-' used by \fIcd\fR and \fIpushd\fR. |
4109 The old working directory, equivalent to the `\-' used by \fIcd\fR and \fIpushd\fR. |
4010 See also the \fBcwd\fR and \fBdirstack\fR shell variables. |
4110 See also the \fBcwd\fR and \fBdirstack\fR shell variables. |
4011 .TP 8 |
4111 .TP 8 |
4012 .B padhour |
4112 .B padhour |
4013 If set, enable the printing of padding '0' for hours, in 24 and 12 hour |
4113 If set, enable the printing of padding '0' for hours, in 24 and 12 hour |
4014 formats. E.G.: 07:45:42 vs. 7:45:42 |
4114 formats. E.G.: 07:45:42 vs. 7:45:42. |
|
4115 .TP 8 |
|
4116 .B parseoctal |
|
4117 To retain compatibily with older versions numeric variables starting with |
|
4118 0 are not interpreted as octal. Setting this variable enables proper octal |
|
4119 parsing. |
4015 .TP 8 |
4120 .TP 8 |
4016 .B path |
4121 .B path |
4017 A list of directories in which to look for executable commands. |
4122 A list of directories in which to look for executable commands. |
4018 A null word specifies the current directory. |
4123 A null word specifies the current directory. |
4019 If there is no \fBpath\fR variable then only full path names will execute. |
4124 If there is no \fBpath\fR variable then only full path names will execute. |
4247 The number of nested shells. |
4355 The number of nested shells. |
4248 Reset to 1 in login shells. |
4356 Reset to 1 in login shells. |
4249 See also \fBloginsh\fR. |
4357 See also \fBloginsh\fR. |
4250 .TP 8 |
4358 .TP 8 |
4251 .B status |
4359 .B status |
4252 The status returned by the last command. If it terminated |
4360 The status returned by the last command, unless the variable |
|
4361 .B anyerror |
|
4362 is set, and any error in a pipeline or a backquote expansion will be |
|
4363 propagated (this is the default |
|
4364 .B csh |
|
4365 behavior, and the current |
|
4366 .B tcsh |
|
4367 default). If it terminated |
4253 abnormally, then 0200 is added to the status. Builtin commands |
4368 abnormally, then 0200 is added to the status. Builtin commands |
4254 which fail return exit status `1', all other builtin commands |
4369 which fail return exit status `1', all other builtin commands |
4255 return status `0'. |
4370 return status `0'. |
4256 .TP 8 |
4371 .TP 8 |
4257 .B symlinks \fR(+) |
4372 .B symlinks \fR(+) |
4990 \fBtty\fR, \fBuid\fR and \fBversion\fR shell variables and the \fBHOST\fR, |
5105 \fBtty\fR, \fBuid\fR and \fBversion\fR shell variables and the \fBHOST\fR, |
4991 \fBREMOTEHOST\fR, \fBVENDOR\fR, \fBOSTYPE\fR and \fBMACHTYPE\fR environment |
5106 \fBREMOTEHOST\fR, \fBVENDOR\fR, \fBOSTYPE\fR and \fBMACHTYPE\fR environment |
4992 variables. |
5107 variables. |
4993 .PP |
5108 .PP |
4994 A new syntax for including useful information in the prompt string |
5109 A new syntax for including useful information in the prompt string |
4995 (see \fBprompt\fR). |
5110 (see \fBprompt\fR), |
4996 and special prompts for loops and spelling correction |
5111 and special prompts for loops and spelling correction |
4997 (see \fBprompt2\fR and \fBprompt3\fR). |
5112 (see \fBprompt2\fR and \fBprompt3\fR). |
4998 .PP |
5113 .PP |
4999 Read-only variables. See \fBVariable substitution\fR. |
5114 Read-only variables. See \fBVariable substitution\fR. |
5000 .SH BUGS |
5115 .SH BUGS |
5015 done with output control. |
5130 done with output control. |
5016 .PP |
5131 .PP |
5017 Alias substitution is most often used to clumsily simulate shell procedures; |
5132 Alias substitution is most often used to clumsily simulate shell procedures; |
5018 shell procedures should be provided rather than aliases. |
5133 shell procedures should be provided rather than aliases. |
5019 .PP |
5134 .PP |
5020 Commands within loops are not placed in the history |
5135 Control structures should be parsed rather than being recognized as |
5021 list. Control structures should be parsed rather than being recognized as |
|
5022 built-in commands. This would allow control commands to be placed anywhere, |
5136 built-in commands. This would allow control commands to be placed anywhere, |
5023 to be combined with `|', and to be used with `&' and `;' metasyntax. |
5137 to be combined with `|', and to be used with `&' and `;' metasyntax. |
5024 .PP |
5138 .PP |
5025 \fIforeach\fR doesn't ignore here documents when looking for its \fIend\fR. |
5139 \fIforeach\fR doesn't ignore here documents when looking for its \fIend\fR. |
5026 .PP |
5140 .PP |
5090 tset(1B), vi(1), X(5), access(2), execve(2), fork(2), killpg(3C), |
5204 tset(1B), vi(1), X(5), access(2), execve(2), fork(2), killpg(3C), |
5091 pipe(2), setrlimit(2), sigvec(3UCB), stat(2), umask(2), vfork(2), wait(2), |
5205 pipe(2), setrlimit(2), sigvec(3UCB), stat(2), umask(2), vfork(2), wait(2), |
5092 malloc(3C), setlocale(3C), tty(7D), a.out(4), terminfo(4), environ(5), |
5206 malloc(3C), setlocale(3C), tty(7D), a.out(4), terminfo(4), environ(5), |
5093 termio(7I), Introduction to the C Shell |
5207 termio(7I), Introduction to the C Shell |
5094 .SH VERSION |
5208 .SH VERSION |
5095 This manual documents tcsh 6.17.00 (Astron) 2009-07-10. |
5209 This manual documents tcsh 6.18.01 (Astron) 2012-02-14. |
5096 .SH AUTHORS |
5210 .SH AUTHORS |
5097 .PD 0 |
5211 .PD 0 |
5098 .TP 2 |
5212 .TP 2 |
5099 William Joy |
5213 William Joy |
5100 Original author of \fIcsh\fR(1) |
5214 Original author of \fIcsh\fR(1) |