The tcshrc manual: A guide for the tcshrc package | ||
---|---|---|
<<< Previous |
For a full list of the tcshrc features of tcsh that are made available, you should consult the .tcshrc.* files and the tcsh man pages. Moreover, there must be a book on the subject from the favourite bookshop.
root has logged on pts/0 from :0.
root has logged on pts/1 from :0.
root has logged on tty1 from local.
Time spent in user mode (CPU seconds) : 8.810s
Time spent in kernel mode (CPU seconds) : 1.030s
Total time : 0:11.66s
CPU utilisation (percentage) : 84.3%
Times the process was swapped : 0
Times of major page faults : 29424
Times of minor page faults : 28521
A: The RC files start with a dot, which means that you need to do
% ls -al
to see them.A: You are doing
%cp /etc/passwd /etc/pa<TAB>
The behaviour set in the .tcshrc files is to complete only in safe mode. This means that it is not sane to complete on existing files in this case.Use
% cp /etc/passwd<ENTER>
cp: error blah blah
% <UP ARROW>
% cp /etc/passwd <F7>
% cp /etc/passwd /etc/passwd<ENTER>
% cp /etc/passwd /etc/passwd<.old>
A: This is part of the completion functionality, and it is configured in .tcshrc.complete.
A: Try this
% cd /usr/locl/bin<ENTER>
CORRECT> cd /usr/local/bin (y|n|e)?<SPACE> or <y>
%
For the opposite, suppose you really want to make the directory /usr/locall
% mkdir /usr/locall<ENTER>
CORRECT> mkdir /usr/local (y|n|e)?<ENTER> or <n>
%
A: It prints the man page (if there is one) of the current command you are trying to execute. It is used like in the following.
% ncftp<F1>
the command "man ncftp" is executed. once you have found the information
you are interested in, you may hit q and continue
editing the command line.
% ncftp
A: Suppose you are editing a long line. F2 sets a mark to the command line while F3 is used to switch between the current position and the marked position.
A: F5 does a spelling check on the current line while F6 spell-checks the current word the cursor is at. Spelling is typically done by checking that filenames or directories exist. You may find it usufull when you type a long command line without hitting the TAB key and you notice that some filenames are not correct.
% cd /usr/loca/bin<F5>
% cd /usr/local/bin
A: Without F7, you would do
% cd /tmp
% ls demodir
not found blah blah
% mkdir demodir
% cd demodir
With F7, you do:
% cd /tmp
% mkdir demodir
% cd <F7>
% cd demodir<ENTER>
A: F8 searches the command history for commands that match the current line, up to the cursor. For example, suppose we want to invoke the history line 18. In a real case, we do not need to type history to check out the previous commands. We typically remember them.
% history<ENTER>
17 21:54 clear
18 21:59 cd /usr/local/samba/bin
19 21:59 ls -l
20 22:00 cd ../lib
21 22:02 vi *
22 22:02 cd
23 22:02 smbclient -L //SERVER/share -U test
24 22:02 history
% cd<F8>
% cd
% cd <F8>
% cd ../lib
% cd ../lib <F8>
% cd /usr/local/samba/bin
A: It simply clear the current screen. It is smarter than a simple clear command, it does not affect the current line you are editing.
A: ls -l is among the most common commands one typically types. F10 does just that, it executes that command. This one does affect the current line you are editing. A workaround is sought that does not affect the current line.
A: It shows the current load of the system and like F9, it does not affect the current line you are editing. On the other hand it does not appear to be enabled on Linux. It remains there until a solution is found.
A: It does standard completion, irrelevant of the smart and configurable completion that tcsh provides. There are some cases that the smart completion is not smart enough. This is where F12 comes in. For example, suppose you have a file called lynx_bookmarks.html and you want to make a backup adding an extension. You may use the trick described elsewhere in this FAQ, using the F7 key, or you can do the following.
% cp ly<TAB>
% cd lynx_bookmarks.html
% cd lynx_bookmarks.html ly<F12>
% cd lynx_bookmarks.html lynx_bookmarks.html.old<ENTER>
root has logged on pts/0 from :0.
root has logged on pts/1 from :0.
root has logged on tty1 from local.
A: They are part of the watch facility. Whenever you run a command in tcsh, tcsh checks if someones has logged on/off the system. If so, it will print it here. It is quite handy to know what is going on your system. It is even handy if you run a non-networked system, to know where you have shells open.
Q: I was compiling an application and at the end of it I got
Time spent in user mode (CPU seconds) : 8.810s
Time spent in kernel mode (CPU seconds) : 1.030s
Total time : 0:11.66s
CPU utilisation (percentage) : 84.3%
Times the process was swapped : 0
Times of major page faults : 29424
Times of minor page faults : 28521
A: These are some statistics that TCSH can provide (in a human readable manner) using a special command (time). With the current configuration, it is printed automatically whenever a process takes quite a bit of time to complete. It shows the time the process spent in kernel and user mode, the total time used for the process, the CPU utilisation (user+kernel time / total time) in %. The swapped times is the times the whole process was swapped. If you have plenty of memory, you usually get 0 here.
For the page faults, a small operating system tutorial. In modern operating systems, memory is used in chunks called pages. These pages can be swapped to the swap partition to make space for other processes. When our process is running and it cannot find one of its pages, it issues a fault, or a page fault and makes arrangements to have the page up. The fewer the page faults, the better. The page fault terminology is a bit wierd and it comes from long time ago.
the amount of page faults look to me rather a lot, perhaps they are faults regarding the presense of the page in the memory cache and not the swap. If a kernel hacker knows about this stuff and can have a look in the source code of TCSH, please clarify this issue. |
A: You can use the cd - command. It takes you to the previous directory. Try it once more to take you to the initial directory.
A: As long as you remember the beginning of the command that resides in the history, you can access it quickly.
Do
% cd /usr/local/samba/lib/
% cd /usr/local/bin/
% cd /etc/
Now you want to go to samba/lib.
% cd <ESC p>
% cd /etc<ESC p>
% cd /usr/local/bin<ESC p>
% cd /usr/local/samba/lib
A: Means you press Ctrl-G. Speaking of ^G, try
% echo <^V><^G><ENTER>
You will hear a BEEP. ^V is used to mask the next character pressed.A: You need to bind F4 with the beep. Beep is ^G. Do
% bindkey -c <^V><F4> "echo -n <^V><^G>"<ENTER>
That's it. You need to use it on an empty command line.Q: How can I traverse the history (backwards and forwards) restricting the search to what I have typed until now?
A: This is similar to the F8 key that goes only backwards. Check the question on the F8 key.
To go backwards, use the ESC p combination. To go forwards, use the ESC n combination. p is for previous and n for next. You hit first ESC, then you hit either p or n.
A: You need to copy them to the /etc/skel directory. Then, the utility that creates new users will automatically include the tcsh configuration files. We assume that the tcsh shell has been chosen for the new user. In the future a script will be written that installs these files on a per-user basis.
<<< Previous | Home | |
I want to make a system installation |