1 2 3 4 5 6 7 8 | arpan@tintin# set autolist arpan@tintin# ls memory.h memory.cpp kernel.c memory.o kernel.o arpan@tintin# rm m[TAB] memory.h memory.cpp memory.o arpan@tintin# set fignore=(.c .cpp .h) arpan@tintin# rm m[TAB] memory.o |
1 2 3 4 5 6 7 8 9 10 11 | arpan@tintin# rsh herge arpan@herge# set autologout=1 arpan@herge# date Sat Jun 28 18:13:07 IST 2008 <After 1 min of inactivity> arpan@herge# auto-logout Connection to herge closed. arpan@tintin# date Sat Jun 28 18:14:10 IST 2008 |
1 2 3 4 5 | arpan@tintin# set watch=(5 any any) <checks for login/logout activity across system every 5 minutes) arpan@tintin# set watch=(b* any) <check the login/logout activities of all users whose name starts with b across any terminal in the network> |
1 2 3 4 | arpan@tintin# log arpan has logged on pts/0 from 132.132.6.73 root has logged on console zanies has logged pts/5 from 132.132.2.1 |
1 2 3 4 5 6 7 8 | tcsh-6.15$ pwd /home/arpan/ibm1 tcsh-6.15$ hostname tintin tcsh-6.15$ echo $user arpan tcsh-6.15$ set prompt="$user@`hostname`[$cwd] " arpan@tintin[/home/arpan/ibm1] |
1 2 3 4 | tcsh-6.15$ alias cmdcwd 'set prompt="$user@`hostname`[$cwd] " ' tcsh-6.15$ cd arpan@tintin[/home/arpan/ibm1] cd net arpan@tintin[/home/arpan/ibm1/net] |
1 2 | arpan@tintin[/home/arpan1/ibm1]# alias cwdcmd 'set prompt="$user@`hostname`[$cwd]# "; echo "^[]2;$cwd^G" ' |
1 2 3 4 5 6 7 | arpan@tintin# set correct=cmd arpan@tintin# prl CORRECT>perl (y|n|e|a)? y .. arpan@tintin# figner CORRECT>finger (y|n|e|a)? y .. |
1 2 3 4 5 6 7 8 | arpan@tintin# set tperiod=10 arpan@tintin# alias periodic checkdiskusage arpan@tintin# cat checkdiskusage df -k | awk -F" " '{print $5}' | grep "9[0-9]*" if ($status <> 0) then mail –s "disk quota exceeded 90%" root@officemail.com endif exit $status |
1 2 3 4 5 6 | arpan@tintin# tty /dev/pts/0 arpan@tintin# set savehist=25 arpan@tintin# set histfile=~/.history_`tty | sed –e 's/\//_/g' ` arpan@tintin# echo $histfile ~/.history_dev_pts_0 |
1 2 3 4 5 6 7 8 9 10 | arpan@tintin# cat script set time du –sm /opt df –k /lib arpan@tintin# tcsh –f ./script 198 /opt 0.628u 0.008s 0:02.00 0.0% 0+0k 0+0io 0pf+0w Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 15773312 1125772 13846300 8% / 0.000u 0.004s 0:00.02 0.0% 0+0k 0+0io 0pf+0w |
1 2 3 4 5 6 7 8 9 10 11 | arpan@tintin# set printexitvalue arpan@tintin# ls /tmp/opt ls: /tmp/opt: No such file or directory Exit 2 arpan@tintin# cat error_script ls –l; return 2 arpan@tintin# ./error_script ./error_script: line 1: return: can only `return' from a function or sourced script Exit 1 arpan@tintin# unset printexitvalue; ls /tmp/opt ls: /tmp/opt: No such file or directory |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |