"Fossies" - the Fresh Open Source Software Archive 
Member "tcshrc/doc/tcshrc/c128.html" (24 Jan 2009, 22904 Bytes) of package /linux/privat/old/tcshrc-1.6.2.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >tcshrc FAQ and features</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.59"><LINK
9 REL="HOME"
10 TITLE="The tcshrc manual"
11 HREF="tcshrc.html"><LINK
12 REL="PREVIOUS"
13 TITLE="I want to make a system installation"
14 HREF="x106.html"></HEAD
15 ><BODY
16 CLASS="CHAPTER"
17 BGCOLOR="#FFFFFF"
18 TEXT="#000000"
19 LINK="#0000FF"
20 VLINK="#840084"
21 ALINK="#0000FF"
22 ><DIV
23 CLASS="NAVHEADER"
24 ><TABLE
25 WIDTH="100%"
26 BORDER="0"
27 CELLPADDING="0"
28 CELLSPACING="0"
29 ><TR
30 ><TH
31 COLSPAN="3"
32 ALIGN="center"
33 >The tcshrc manual: A guide for the tcshrc package</TH
34 ></TR
35 ><TR
36 ><TD
37 WIDTH="10%"
38 ALIGN="left"
39 VALIGN="bottom"
40 ><A
41 HREF="x106.html"
42 ><<< Previous</A
43 ></TD
44 ><TD
45 WIDTH="80%"
46 ALIGN="center"
47 VALIGN="bottom"
48 ></TD
49 ><TD
50 WIDTH="10%"
51 ALIGN="right"
52 VALIGN="bottom"
53 > </TD
54 ></TR
55 ></TABLE
56 ><HR
57 ALIGN="LEFT"
58 WIDTH="100%"></DIV
59 ><DIV
60 CLASS="CHAPTER"
61 ><H1
62 ><A
63 NAME="AEN128"
64 >tcshrc FAQ and features</A
65 ></H1
66 ><P
67 >For a full list of the tcshrc features of tcsh that are made available,
68 you should consult the <TT
69 CLASS="FILENAME"
70 >.tcshrc.*</TT
71 > files and the tcsh
72 man pages. Moreover, there must be a book on the subject from the favourite bookshop. </P
73 ><DIV
74 CLASS="QANDASET"
75 ><DL
76 ><DT
77 >Q: <A
78 HREF="c128.html#AEN134"
79 >I did "tar xvfz tcshrc-0.x.tar.gz" and I did not find any RC files!</A
80 ></DT
81 ><DT
82 >Q: <A
83 HREF="c128.html#AEN142"
84 >When I try the completion, it does not work!</A
85 ></DT
86 ><DT
87 >Q: <A
88 HREF="c128.html#AEN162"
89 >When I do "cd<TAB>", I only see directories. This is nice!</A
90 ></DT
91 ><DT
92 >Q: <A
93 HREF="c128.html#AEN169"
94 >Auto-correction confuses me.</A
95 ></DT
96 ><DT
97 >Q: <A
98 HREF="c128.html#AEN188"
99 >What does the F1 key do?</A
100 ></DT
101 ><DT
102 >Q: <A
103 HREF="c128.html#AEN201"
104 >What do the F2 and F3 keys do?</A
105 ></DT
106 ><DT
107 >Q: <A
108 HREF="c128.html#AEN206"
109 >What does the F4 key do?</A
110 ></DT
111 ><DT
112 >Q: <A
113 HREF="c128.html#AEN211"
114 >What do F5 and F6 do?</A
115 ></DT
116 ><DT
117 >Q: <A
118 HREF="c128.html#AEN221"
119 >What does the F7 key do?</A
120 ></DT
121 ><DT
122 >Q: <A
123 HREF="c128.html#AEN243"
124 >What does F8 do?</A
125 ></DT
126 ><DT
127 >Q: <A
128 HREF="c128.html#AEN261"
129 >What does F9 do?</A
130 ></DT
131 ><DT
132 >Q: <A
133 HREF="c128.html#AEN267"
134 >What does F10 do?</A
135 ></DT
136 ><DT
137 >Q: <A
138 HREF="c128.html#AEN273"
139 >What does F11 do?</A
140 ></DT
141 ><DT
142 >Q: <A
143 HREF="c128.html#AEN278"
144 >What does F12 do?</A
145 ></DT
146 ><DT
147 >Q: <A
148 HREF="c128.html#AEN291"
149 >What do these lines mean?
150
151 <P
152 CLASS="LITERALLAYOUT"
153 >root has logged on pts/0 from :0.<br>
154 root has logged on pts/1 from :0.<br>
155 root has logged on tty1 from local.</P
156 ></A
157 ></DT
158 ><DT
159 >Q: <A
160 HREF="c128.html#AEN298"
161 >I was compiling an application and at the end of it I got
162
163 <P
164 CLASS="LITERALLAYOUT"
165 >Time spent in user mode (CPU seconds) : 8.810s<br>
166 Time spent in kernel mode (CPU seconds) : 1.030s<br>
167 Total time : 0:11.66s<br>
168 CPU utilisation (percentage) : 84.3%<br>
169 Times the process was swapped : 0<br>
170 Times of major page faults : 29424<br>
171 Times of minor page faults : 28521</P
172 > </A
173 ></DT
174 ><DT
175 >Q: <A
176 HREF="c128.html#AEN311"
177 >I find it a bit awkward when I change back and forth directories.
178 Any nice trick?</A
179 ></DT
180 ><DT
181 >Q: <A
182 HREF="c128.html#AEN317"
183 >How can I access that <I
184 CLASS="EMPHASIS"
185 >cd /usr/local/samba/lib/</I
186 > command I type ages ago?</A
187 ></DT
188 ><DT
189 >Q: <A
190 HREF="c128.html#AEN340"
191 >What does ^G mean?</A
192 ></DT
193 ><DT
194 >Q: <A
195 HREF="c128.html#AEN349"
196 >I want F4 to beep to me!</A
197 ></DT
198 ><DT
199 >Q: <A
200 HREF="c128.html#AEN357"
201 >How can I traverse the history (backwards and forwards) restricting the search to what I have typed until now?</A
202 ></DT
203 ><DT
204 >Q: <A
205 HREF="c128.html#AEN365"
206 >How can I make it so that these .tcshrc* files are added to each newly created user?</A
207 ></DT
208 ></DL
209 ><DIV
210 CLASS="QANDAENTRY"
211 ><DIV
212 CLASS="QUESTION"
213 ><P
214 ><BIG
215 ><A
216 NAME="AEN134"
217 ></A
218 ><B
219 >Q: I did "tar xvfz tcshrc-0.x.tar.gz" and I did not find any RC files!</B
220 ></BIG
221 ></P
222 ></DIV
223 ><DIV
224 CLASS="ANSWER"
225 ><P
226 ><B
227 >A: </B
228 >The RC files start with a dot, which means that you need to do
229 <P
230 CLASS="LITERALLAYOUT"
231 ><TT
232 CLASS="PROMPT"
233 >%</TT
234 > <TT
235 CLASS="USERINPUT"
236 ><B
237 >ls -al</B
238 ></TT
239 ></P
240 >
241 to see them.</P
242 ></DIV
243 ></DIV
244 ><DIV
245 CLASS="QANDAENTRY"
246 ><DIV
247 CLASS="QUESTION"
248 ><P
249 ><BIG
250 ><A
251 NAME="AEN142"
252 ></A
253 ><B
254 >Q: When I try the completion, it does not work!</B
255 ></BIG
256 ></P
257 ></DIV
258 ><DIV
259 CLASS="ANSWER"
260 ><P
261 ><B
262 >A: </B
263 >You are doing
264 <P
265 CLASS="LITERALLAYOUT"
266 > <TT
267 CLASS="PROMPT"
268 >%</TT
269 ><TT
270 CLASS="USERINPUT"
271 ><B
272 >cp /etc/passwd /etc/pa<TAB></B
273 ></TT
274 ></P
275 >
276
277 The behaviour set in the .tcshrc files is to complete only in safe mode.
278 This means that it is not sane to complete on existing files in this case.</P
279 ><P
280 >Use
281 <P
282 CLASS="LITERALLAYOUT"
283 > <TT
284 CLASS="PROMPT"
285 >%</TT
286 > <TT
287 CLASS="USERINPUT"
288 ><B
289 >cp /etc/passwd<ENTER></B
290 ></TT
291 ><br>
292 cp: error blah blah<br>
293 <TT
294 CLASS="PROMPT"
295 >%</TT
296 > <TT
297 CLASS="USERINPUT"
298 ><B
299 ><UP ARROW></B
300 ></TT
301 ><br>
302 <TT
303 CLASS="PROMPT"
304 >%</TT
305 > cp /etc/passwd <TT
306 CLASS="USERINPUT"
307 ><B
308 ><F7></B
309 ></TT
310 ><br>
311 <TT
312 CLASS="PROMPT"
313 >%</TT
314 > cp /etc/passwd /etc/passwd<TT
315 CLASS="USERINPUT"
316 ><B
317 ><ENTER></B
318 ></TT
319 ><br>
320 <TT
321 CLASS="PROMPT"
322 >%</TT
323 > cp /etc/passwd /etc/passwd<TT
324 CLASS="USERINPUT"
325 ><B
326 ><.old></B
327 ></TT
328 ></P
329 >
330
331 The F7 key prints the last argument of the previous command.</P
332 ></DIV
333 ></DIV
334 ><DIV
335 CLASS="QANDAENTRY"
336 ><DIV
337 CLASS="QUESTION"
338 ><P
339 ><BIG
340 ><A
341 NAME="AEN162"
342 ></A
343 ><B
344 >Q: When I do "cd<TAB>", I only see directories. This is nice!</B
345 ></BIG
346 ></P
347 ></DIV
348 ><DIV
349 CLASS="ANSWER"
350 ><P
351 ><B
352 >A: </B
353 >This is part of the <I
354 CLASS="EMPHASIS"
355 >completion</I
356 > functionality, and it is configured
357 in <TT
358 CLASS="FILENAME"
359 >.tcshrc.complete</TT
360 >.</P
361 ></DIV
362 ></DIV
363 ><DIV
364 CLASS="QANDAENTRY"
365 ><DIV
366 CLASS="QUESTION"
367 ><P
368 ><BIG
369 ><A
370 NAME="AEN169"
371 ></A
372 ><B
373 >Q: Auto-correction confuses me.</B
374 ></BIG
375 ></P
376 ></DIV
377 ><DIV
378 CLASS="ANSWER"
379 ><P
380 ><B
381 >A: </B
382 >Try this
383
384 <P
385 CLASS="LITERALLAYOUT"
386 ><TT
387 CLASS="PROMPT"
388 >%</TT
389 > <TT
390 CLASS="USERINPUT"
391 ><B
392 >cd /usr/locl/bin<ENTER></B
393 ></TT
394 ><br>
395 CORRECT> cd /usr/local/bin (y|n|e)?<TT
396 CLASS="USERINPUT"
397 ><B
398 ><SPACE></B
399 ></TT
400 > or <TT
401 CLASS="USERINPUT"
402 ><B
403 ><y></B
404 ></TT
405 ><br>
406 <TT
407 CLASS="PROMPT"
408 >%</TT
409 ></P
410 ></P
411 ><P
412 >For the opposite, suppose you really want to make the directory
413 <TT
414 CLASS="FILENAME"
415 >/usr/locall</TT
416 >
417
418 <P
419 CLASS="LITERALLAYOUT"
420 > <TT
421 CLASS="PROMPT"
422 >%</TT
423 > <TT
424 CLASS="USERINPUT"
425 ><B
426 >mkdir /usr/locall<ENTER></B
427 ></TT
428 ><br>
429 CORRECT> mkdir /usr/local (y|n|e)?<ENTER> or <n><br>
430 <TT
431 CLASS="PROMPT"
432 >%</TT
433 ></P
434 >
435
436 Consider that the SPACE key means <I
437 CLASS="EMPHASIS"
438 >acceptance of suggestion</I
439 >
440 while the ENTER key means <I
441 CLASS="EMPHASIS"
442 >forcing what we wrote</I
443 >.</P
444 ></DIV
445 ></DIV
446 ><DIV
447 CLASS="QANDAENTRY"
448 ><DIV
449 CLASS="QUESTION"
450 ><P
451 ><BIG
452 ><A
453 NAME="AEN188"
454 ></A
455 ><B
456 >Q: What does the F1 key do?</B
457 ></BIG
458 ></P
459 ></DIV
460 ><DIV
461 CLASS="ANSWER"
462 ><P
463 ><B
464 >A: </B
465 >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.
466
467 <P
468 CLASS="LITERALLAYOUT"
469 > <TT
470 CLASS="PROMPT"
471 >%</TT
472 > <TT
473 CLASS="USERINPUT"
474 ><B
475 > ncftp<F1></B
476 ></TT
477 ><br>
478 <br>
479 <I
480 CLASS="EMPHASIS"
481 >the command "man ncftp" is executed. once you have found the information
482 you are interested in, you may hit <TT
483 CLASS="USERINPUT"
484 ><B
485 >q</B
486 ></TT
487 > and continue
488 editing the command line.</I
489 ><br>
490 <TT
491 CLASS="PROMPT"
492 >%</TT
493 > ncftp</P
494 >
495
496 It does not disturb the command you are current editing. At present, the <I
497 CLASS="EMPHASIS"
498 >man</I
499 >
500 application is used to provide full help documentation. Another option is to use <I
501 CLASS="EMPHASIS"
502 >whatis</I
503 >.
504 If you are aware of a utility that provides short help of up to 15 lines for typical UNIX commands,
505 the author would be glad to hear about.</P
506 ></DIV
507 ></DIV
508 ><DIV
509 CLASS="QANDAENTRY"
510 ><DIV
511 CLASS="QUESTION"
512 ><P
513 ><BIG
514 ><A
515 NAME="AEN201"
516 ></A
517 ><B
518 >Q: What do the F2 and F3 keys do?</B
519 ></BIG
520 ></P
521 ></DIV
522 ><DIV
523 CLASS="ANSWER"
524 ><P
525 ><B
526 >A: </B
527 >Suppose you are editing a long line. F2 sets a mark to the command line while F3 is used to switch between
528 the current position and the marked position. </P
529 ></DIV
530 ></DIV
531 ><DIV
532 CLASS="QANDAENTRY"
533 ><DIV
534 CLASS="QUESTION"
535 ><P
536 ><BIG
537 ><A
538 NAME="AEN206"
539 ></A
540 ><B
541 >Q: What does the F4 key do?</B
542 ></BIG
543 ></P
544 ></DIV
545 ><DIV
546 CLASS="ANSWER"
547 ><P
548 ><B
549 >A: </B
550 >Currently nothing. </P
551 ></DIV
552 ></DIV
553 ><DIV
554 CLASS="QANDAENTRY"
555 ><DIV
556 CLASS="QUESTION"
557 ><P
558 ><BIG
559 ><A
560 NAME="AEN211"
561 ></A
562 ><B
563 >Q: What do F5 and F6 do?</B
564 ></BIG
565 ></P
566 ></DIV
567 ><DIV
568 CLASS="ANSWER"
569 ><P
570 ><B
571 >A: </B
572 >F5 does a spelling check on the current line while F6 spell-checks the current word the cursor is at.
573 Spelling is typically done by checking that filenames or directories exist. You may find it usufull when you type
574 a long command line without hitting the TAB key and you notice that some filenames are not correct.
575
576 <P
577 CLASS="LITERALLAYOUT"
578 > <TT
579 CLASS="PROMPT"
580 >%</TT
581 > <TT
582 CLASS="USERINPUT"
583 ><B
584 > cd /usr/loca/bin<F5></B
585 ></TT
586 ><br>
587 <TT
588 CLASS="PROMPT"
589 >%</TT
590 > <TT
591 CLASS="USERINPUT"
592 ><B
593 > cd /usr/local/bin</B
594 ></TT
595 ></P
596 ></P
597 ></DIV
598 ></DIV
599 ><DIV
600 CLASS="QANDAENTRY"
601 ><DIV
602 CLASS="QUESTION"
603 ><P
604 ><BIG
605 ><A
606 NAME="AEN221"
607 ></A
608 ><B
609 >Q: What does the F7 key do?</B
610 ></BIG
611 ></P
612 ></DIV
613 ><DIV
614 CLASS="ANSWER"
615 ><P
616 ><B
617 >A: </B
618 >Without F7, you would do
619
620 <P
621 CLASS="LITERALLAYOUT"
622 > <TT
623 CLASS="PROMPT"
624 >%</TT
625 > <TT
626 CLASS="USERINPUT"
627 ><B
628 > cd /tmp</B
629 ></TT
630 ><br>
631 <TT
632 CLASS="PROMPT"
633 >%</TT
634 > <TT
635 CLASS="USERINPUT"
636 ><B
637 > ls demodir</B
638 ></TT
639 ><br>
640 not found blah blah<br>
641 <TT
642 CLASS="PROMPT"
643 >%</TT
644 > <TT
645 CLASS="USERINPUT"
646 ><B
647 > mkdir demodir</B
648 ></TT
649 ><br>
650 <TT
651 CLASS="PROMPT"
652 >%</TT
653 > <TT
654 CLASS="USERINPUT"
655 ><B
656 > cd demodir</B
657 ></TT
658 ><br>
659 <br>
660 With F7, you do:<br>
661 <br>
662 <TT
663 CLASS="PROMPT"
664 >%</TT
665 > <TT
666 CLASS="USERINPUT"
667 ><B
668 > cd /tmp</B
669 ></TT
670 ><br>
671 <TT
672 CLASS="PROMPT"
673 >%</TT
674 > <TT
675 CLASS="USERINPUT"
676 ><B
677 > mkdir demodir</B
678 ></TT
679 ><br>
680 <TT
681 CLASS="PROMPT"
682 >%</TT
683 > <TT
684 CLASS="USERINPUT"
685 ><B
686 > cd <F7></B
687 ></TT
688 ><br>
689 <TT
690 CLASS="PROMPT"
691 >%</TT
692 > cd demodir<TT
693 CLASS="USERINPUT"
694 ><B
695 ><ENTER></B
696 ></TT
697 ></P
698 >
699
700 Try several times to get used to it.
701 F7 prints the last argument of the previous command.</P
702 ></DIV
703 ></DIV
704 ><DIV
705 CLASS="QANDAENTRY"
706 ><DIV
707 CLASS="QUESTION"
708 ><P
709 ><BIG
710 ><A
711 NAME="AEN243"
712 ></A
713 ><B
714 >Q: What does F8 do?</B
715 ></BIG
716 ></P
717 ></DIV
718 ><DIV
719 CLASS="ANSWER"
720 ><P
721 ><B
722 >A: </B
723 >F8 searches the command history for commands that match the current line,
724 up to the cursor. For example, suppose we want to invoke the history line 18.
725 In a real case, we do not need to type <I
726 CLASS="EMPHASIS"
727 >history</I
728 > to check
729 out the previous commands. We typically remember them.
730
731 <P
732 CLASS="LITERALLAYOUT"
733 > <TT
734 CLASS="PROMPT"
735 >%</TT
736 > <TT
737 CLASS="USERINPUT"
738 ><B
739 > history<ENTER></B
740 ></TT
741 ><br>
742 17 21:54 clear <br>
743 18 21:59 cd /usr/local/samba/bin<br>
744 19 21:59 ls -l<br>
745 20 22:00 cd ../lib<br>
746 21 22:02 vi *<br>
747 22 22:02 cd<br>
748 23 22:02 smbclient -L //SERVER/share -U test<br>
749 24 22:02 history<br>
750 <br>
751 <TT
752 CLASS="PROMPT"
753 >%</TT
754 > <TT
755 CLASS="USERINPUT"
756 ><B
757 > cd<F8></B
758 ></TT
759 ><br>
760 <TT
761 CLASS="PROMPT"
762 >%</TT
763 > cd<br>
764 <TT
765 CLASS="PROMPT"
766 >%</TT
767 > cd <TT
768 CLASS="USERINPUT"
769 ><B
770 ><F8></B
771 ></TT
772 ><br>
773 <TT
774 CLASS="PROMPT"
775 >%</TT
776 > cd ../lib<br>
777 <TT
778 CLASS="PROMPT"
779 >%</TT
780 > cd ../lib<TT
781 CLASS="USERINPUT"
782 ><B
783 > <F8></B
784 ></TT
785 ><br>
786 <TT
787 CLASS="PROMPT"
788 >%</TT
789 > cd /usr/local/samba/bin</P
790 ></P
791 ></DIV
792 ></DIV
793 ><DIV
794 CLASS="QANDAENTRY"
795 ><DIV
796 CLASS="QUESTION"
797 ><P
798 ><BIG
799 ><A
800 NAME="AEN261"
801 ></A
802 ><B
803 >Q: What does F9 do?</B
804 ></BIG
805 ></P
806 ></DIV
807 ><DIV
808 CLASS="ANSWER"
809 ><P
810 ><B
811 >A: </B
812 >It simply clear the current screen. It is smarter than a simple <TT
813 CLASS="APPLICATION"
814 >clear</TT
815 >
816 command, it does not affect the current line you are editing. </P
817 ></DIV
818 ></DIV
819 ><DIV
820 CLASS="QANDAENTRY"
821 ><DIV
822 CLASS="QUESTION"
823 ><P
824 ><BIG
825 ><A
826 NAME="AEN267"
827 ></A
828 ><B
829 >Q: What does F10 do?</B
830 ></BIG
831 ></P
832 ></DIV
833 ><DIV
834 CLASS="ANSWER"
835 ><P
836 ><B
837 >A: </B
838 ><TT
839 CLASS="APPLICATION"
840 >ls -l</TT
841 > is among the most common commands one typically types.
842 F10 does just that, it executes that command. This one does affect the current line you are editing.
843 A workaround is sought that does not affect the current line. </P
844 ></DIV
845 ></DIV
846 ><DIV
847 CLASS="QANDAENTRY"
848 ><DIV
849 CLASS="QUESTION"
850 ><P
851 ><BIG
852 ><A
853 NAME="AEN273"
854 ></A
855 ><B
856 >Q: What does F11 do?</B
857 ></BIG
858 ></P
859 ></DIV
860 ><DIV
861 CLASS="ANSWER"
862 ><P
863 ><B
864 >A: </B
865 >It shows the current load of the system and like F9, it does not affect the current line you are editing.
866 On the other hand it does not appear to be enabled on Linux. It remains there until a solution is found.</P
867 ></DIV
868 ></DIV
869 ><DIV
870 CLASS="QANDAENTRY"
871 ><DIV
872 CLASS="QUESTION"
873 ><P
874 ><BIG
875 ><A
876 NAME="AEN278"
877 ></A
878 ><B
879 >Q: What does F12 do?</B
880 ></BIG
881 ></P
882 ></DIV
883 ><DIV
884 CLASS="ANSWER"
885 ><P
886 ><B
887 >A: </B
888 >It does standard completion, irrelevant of the smart and configurable completion that tcsh provides.
889 There are some cases that the smart completion is not smart enough. This is where F12 comes in. For example,
890 suppose you have a file called lynx_bookmarks.html and you want to make a backup adding an extension. You may use
891 the trick described elsewhere in this FAQ, using the F7 key, or you can do the following.
892
893 <P
894 CLASS="LITERALLAYOUT"
895 > <TT
896 CLASS="PROMPT"
897 >%</TT
898 > <TT
899 CLASS="USERINPUT"
900 ><B
901 > cp ly<TAB></B
902 ></TT
903 ><br>
904 <TT
905 CLASS="PROMPT"
906 >%</TT
907 > cd lynx_bookmarks.html<br>
908 <TT
909 CLASS="PROMPT"
910 >%</TT
911 > cd lynx_bookmarks.html<TT
912 CLASS="USERINPUT"
913 ><B
914 > ly<F12></B
915 ></TT
916 ><br>
917 <TT
918 CLASS="PROMPT"
919 >%</TT
920 > cd lynx_bookmarks.html lynx_bookmarks.html<TT
921 CLASS="USERINPUT"
922 ><B
923 >.old<ENTER></B
924 ></TT
925 ></P
926 > </P
927 ></DIV
928 ></DIV
929 ><DIV
930 CLASS="QANDAENTRY"
931 ><DIV
932 CLASS="QUESTION"
933 ><P
934 ><BIG
935 ><A
936 NAME="AEN291"
937 ></A
938 ><B
939 >Q: What do these lines mean?
940
941 <P
942 CLASS="LITERALLAYOUT"
943 >root has logged on pts/0 from :0.<br>
944 root has logged on pts/1 from :0.<br>
945 root has logged on tty1 from local.</P
946 ></B
947 ></BIG
948 ></P
949 ></DIV
950 ><DIV
951 CLASS="ANSWER"
952 ><P
953 ><B
954 >A: </B
955 >They are part of the <I
956 CLASS="EMPHASIS"
957 >watch</I
958 > facility.
959 Whenever you run a command in tcsh, tcsh checks if someones has
960 logged on/off the system. If so, it will print it here.
961 It is quite handy to know what is going on your system.
962 It is even handy if you run a non-networked system, to know where you
963 have shells open.</P
964 ></DIV
965 ></DIV
966 ><DIV
967 CLASS="QANDAENTRY"
968 ><DIV
969 CLASS="QUESTION"
970 ><P
971 ><BIG
972 ><A
973 NAME="AEN298"
974 ></A
975 ><B
976 >Q: I was compiling an application and at the end of it I got
977
978 <P
979 CLASS="LITERALLAYOUT"
980 >Time spent in user mode (CPU seconds) : 8.810s<br>
981 Time spent in kernel mode (CPU seconds) : 1.030s<br>
982 Total time : 0:11.66s<br>
983 CPU utilisation (percentage) : 84.3%<br>
984 Times the process was swapped : 0<br>
985 Times of major page faults : 29424<br>
986 Times of minor page faults : 28521</P
987 > </B
988 ></BIG
989 ></P
990 ></DIV
991 ><DIV
992 CLASS="ANSWER"
993 ><P
994 ><B
995 >A: </B
996 >These are some statistics that TCSH can provide (in a human readable manner)
997 using a special command (time).
998 With the current configuration, it is printed automatically whenever
999 a process takes quite a bit of time to complete. It shows the time
1000 the process spent in kernel and user mode, the total time used for the
1001 process, the CPU utilisation (user+kernel time / total time) in %.
1002 The swapped times is the times the whole process was swapped.
1003 If you have plenty of memory, you usually get 0 here.</P
1004 ><P
1005 >For the page faults, a small operating system tutorial. In modern operating
1006 systems, memory is used in chunks called pages. These pages can be swapped
1007 to the swap partition to make space for other processes. When our process
1008 is running and it cannot find one of its <I
1009 CLASS="EMPHASIS"
1010 >pages</I
1011 >,
1012 it issues a <I
1013 CLASS="EMPHASIS"
1014 >fault</I
1015 >, or
1016 a <I
1017 CLASS="EMPHASIS"
1018 >page fault</I
1019 > and makes arrangements to have the page up.
1020 The fewer the page faults, the better. The <I
1021 CLASS="EMPHASIS"
1022 >page fault</I
1023 >
1024 terminology is a bit wierd and it comes from long time ago.
1025
1026 <DIV
1027 CLASS="NOTE"
1028 ><P
1029 ></P
1030 ><TABLE
1031 CLASS="NOTE"
1032 WIDTH="100%"
1033 BORDER="0"
1034 ><TR
1035 ><TD
1036 WIDTH="25"
1037 ALIGN="CENTER"
1038 VALIGN="TOP"
1039 ><IMG
1040 SRC="./stylesheet-images/note.gif"
1041 HSPACE="5"
1042 ALT="Note"></TD
1043 ><TD
1044 ALIGN="LEFT"
1045 VALIGN="TOP"
1046 ><P
1047 >the amount of page faults look to me rather a lot, perhaps they are
1048 faults regarding the presense of the page in the memory cache and not the
1049 swap. If a kernel hacker knows about this stuff and can have a look in the
1050 source code of TCSH, please clarify this issue.</P
1051 ></TD
1052 ></TR
1053 ></TABLE
1054 ></DIV
1055 ></P
1056 ></DIV
1057 ></DIV
1058 ><DIV
1059 CLASS="QANDAENTRY"
1060 ><DIV
1061 CLASS="QUESTION"
1062 ><P
1063 ><BIG
1064 ><A
1065 NAME="AEN311"
1066 ></A
1067 ><B
1068 >Q: I find it a bit awkward when I change back and forth directories.
1069 Any nice trick?</B
1070 ></BIG
1071 ></P
1072 ></DIV
1073 ><DIV
1074 CLASS="ANSWER"
1075 ><P
1076 ><B
1077 >A: </B
1078 >You can use the <I
1079 CLASS="EMPHASIS"
1080 >cd -</I
1081 > command. It takes you to the previous directory.
1082 Try it once more to take you to the initial directory.</P
1083 ></DIV
1084 ></DIV
1085 ><DIV
1086 CLASS="QANDAENTRY"
1087 ><DIV
1088 CLASS="QUESTION"
1089 ><P
1090 ><BIG
1091 ><A
1092 NAME="AEN317"
1093 ></A
1094 ><B
1095 >Q: How can I access that <I
1096 CLASS="EMPHASIS"
1097 >cd /usr/local/samba/lib/</I
1098 > command I type ages ago?</B
1099 ></BIG
1100 ></P
1101 ></DIV
1102 ><DIV
1103 CLASS="ANSWER"
1104 ><P
1105 ><B
1106 >A: </B
1107 >As long as you remember the beginning of the command that resides in the
1108 history, you can access it quickly.</P
1109 ><P
1110 >Do
1111
1112 <P
1113 CLASS="LITERALLAYOUT"
1114 > <TT
1115 CLASS="PROMPT"
1116 >%</TT
1117 > <TT
1118 CLASS="USERINPUT"
1119 ><B
1120 > cd /usr/local/samba/lib/</B
1121 ></TT
1122 ><br>
1123 <TT
1124 CLASS="PROMPT"
1125 >%</TT
1126 > <TT
1127 CLASS="USERINPUT"
1128 ><B
1129 > cd /usr/local/bin/</B
1130 ></TT
1131 ><br>
1132 <TT
1133 CLASS="PROMPT"
1134 >%</TT
1135 > <TT
1136 CLASS="USERINPUT"
1137 ><B
1138 > cd /etc/</B
1139 ></TT
1140 ></P
1141 ></P
1142 ><P
1143 >Now you want to go to samba/lib.
1144 <P
1145 CLASS="LITERALLAYOUT"
1146 > <TT
1147 CLASS="PROMPT"
1148 >%</TT
1149 > <TT
1150 CLASS="USERINPUT"
1151 ><B
1152 > cd <ESC p></B
1153 ></TT
1154 ><br>
1155 <TT
1156 CLASS="PROMPT"
1157 >%</TT
1158 > cd /etc<TT
1159 CLASS="USERINPUT"
1160 ><B
1161 ><ESC p></B
1162 ></TT
1163 ><br>
1164 <TT
1165 CLASS="PROMPT"
1166 >%</TT
1167 > cd /usr/local/bin<TT
1168 CLASS="USERINPUT"
1169 ><B
1170 ><ESC p></B
1171 ></TT
1172 ><br>
1173 <TT
1174 CLASS="PROMPT"
1175 >%</TT
1176 > cd /usr/local/samba/lib</P
1177 >
1178
1179 That is, you press several times ESC p to go to the Previous occurence
1180 of a similar command. If at some point you want to go to the next command
1181 in the history, hit ESC n.</P
1182 ></DIV
1183 ></DIV
1184 ><DIV
1185 CLASS="QANDAENTRY"
1186 ><DIV
1187 CLASS="QUESTION"
1188 ><P
1189 ><BIG
1190 ><A
1191 NAME="AEN340"
1192 ></A
1193 ><B
1194 >Q: What does ^G mean?</B
1195 ></BIG
1196 ></P
1197 ></DIV
1198 ><DIV
1199 CLASS="ANSWER"
1200 ><P
1201 ><B
1202 >A: </B
1203 >Means you press Ctrl-G.
1204 Speaking of ^G, try
1205 <P
1206 CLASS="LITERALLAYOUT"
1207 > <TT
1208 CLASS="PROMPT"
1209 >%</TT
1210 > <TT
1211 CLASS="USERINPUT"
1212 ><B
1213 > echo <^V><^G><ENTER></B
1214 ></TT
1215 ></P
1216 >
1217
1218 You will hear a BEEP.
1219 ^V is used to <I
1220 CLASS="EMPHASIS"
1221 >mask</I
1222 > the next character pressed. </P
1223 ></DIV
1224 ></DIV
1225 ><DIV
1226 CLASS="QANDAENTRY"
1227 ><DIV
1228 CLASS="QUESTION"
1229 ><P
1230 ><BIG
1231 ><A
1232 NAME="AEN349"
1233 ></A
1234 ><B
1235 >Q: I want F4 to beep to me!</B
1236 ></BIG
1237 ></P
1238 ></DIV
1239 ><DIV
1240 CLASS="ANSWER"
1241 ><P
1242 ><B
1243 >A: </B
1244 >You need to bind F4 with the beep. Beep is ^G.
1245 Do
1246 <P
1247 CLASS="LITERALLAYOUT"
1248 > <TT
1249 CLASS="PROMPT"
1250 >%</TT
1251 > <TT
1252 CLASS="USERINPUT"
1253 ><B
1254 >bindkey -c <^V><F4> "echo -n <^V><^G>"<ENTER></B
1255 ></TT
1256 ></P
1257 >
1258
1259 That's it. You need to use it on an empty command line. </P
1260 ></DIV
1261 ></DIV
1262 ><DIV
1263 CLASS="QANDAENTRY"
1264 ><DIV
1265 CLASS="QUESTION"
1266 ><P
1267 ><BIG
1268 ><A
1269 NAME="AEN357"
1270 ></A
1271 ><B
1272 >Q: How can I traverse the history (backwards and forwards) restricting the search to what I have typed until now?</B
1273 ></BIG
1274 ></P
1275 ></DIV
1276 ><DIV
1277 CLASS="ANSWER"
1278 ><P
1279 ><B
1280 >A: </B
1281 >This is similar to the F8 key that goes only backwards. Check the question on the F8 key. </P
1282 ><P
1283 >To go backwards, use the <TT
1284 CLASS="USERINPUT"
1285 ><B
1286 >ESC p</B
1287 ></TT
1288 > combination.
1289 To go forwards, use the <TT
1290 CLASS="USERINPUT"
1291 ><B
1292 >ESC n</B
1293 ></TT
1294 > combination.
1295 p is for previous and n for next. You hit first ESC, then you hit either p or n. </P
1296 ></DIV
1297 ></DIV
1298 ><DIV
1299 CLASS="QANDAENTRY"
1300 ><DIV
1301 CLASS="QUESTION"
1302 ><P
1303 ><BIG
1304 ><A
1305 NAME="AEN365"
1306 ></A
1307 ><B
1308 >Q: How can I make it so that these .tcshrc* files are added to each newly created user?</B
1309 ></BIG
1310 ></P
1311 ></DIV
1312 ><DIV
1313 CLASS="ANSWER"
1314 ><P
1315 ><B
1316 >A: </B
1317 >You need to copy them to the <TT
1318 CLASS="FILENAME"
1319 >/etc/skel</TT
1320 > directory.
1321 Then, the utility that creates new users will automatically include the tcsh
1322 configuration files. We assume that the tcsh shell has been chosen for the new user.
1323 In the future a script will be written that installs these files on a per-user basis.</P
1324 ></DIV
1325 ></DIV
1326 ></DIV
1327 ></DIV
1328 ><DIV
1329 CLASS="NAVFOOTER"
1330 ><HR
1331 ALIGN="LEFT"
1332 WIDTH="100%"><TABLE
1333 WIDTH="100%"
1334 BORDER="0"
1335 CELLPADDING="0"
1336 CELLSPACING="0"
1337 ><TR
1338 ><TD
1339 WIDTH="33%"
1340 ALIGN="left"
1341 VALIGN="top"
1342 ><A
1343 HREF="x106.html"
1344 ><<< Previous</A
1345 ></TD
1346 ><TD
1347 WIDTH="34%"
1348 ALIGN="center"
1349 VALIGN="top"
1350 ><A
1351 HREF="tcshrc.html"
1352 >Home</A
1353 ></TD
1354 ><TD
1355 WIDTH="33%"
1356 ALIGN="right"
1357 VALIGN="top"
1358 > </TD
1359 ></TR
1360 ><TR
1361 ><TD
1362 WIDTH="33%"
1363 ALIGN="left"
1364 VALIGN="top"
1365 >I want to make a system installation</TD
1366 ><TD
1367 WIDTH="34%"
1368 ALIGN="center"
1369 VALIGN="top"
1370 > </TD
1371 ><TD
1372 WIDTH="33%"
1373 ALIGN="right"
1374 VALIGN="top"
1375 > </TD
1376 ></TR
1377 ></TABLE
1378 ></DIV
1379 ></BODY
1380 ></HTML
1381 >