September 2010
M T W T F S S
« Jul    
 12345
6789101112
13141516171819
20212223242526
27282930  

Some examples of stty usage

1.Typing invisiable password

?View Code TEXT1
2
3
4
5
echo "Enter your password: \c"
oldstty=`stty -g`
stty -echo intr ^-
read password
stty $oldstty

2.Backspace setting

?View Code TEXT1
stty erase ^h

3.Colunm setting

?View Code TEXT1
stty column 100

4.List current stty setting

?View Code TEXT1
2
3
stty -a (all setting)
stty (undefault setting)
stty -g (RAW mode)

You can get the help files regarding stty usage in the folllowing ways:

?View Code [...]

修改Unix/Linux主机名

RHEL4-U5
1.将下列文件中原主机名改成你想要的名字。

?View Code TEXT/etc/sysconfig/network
/etc/hosts

2.使主机名生效

?View Code TEXT#hostname name_you _want

basename 和 dirname

1.basename
basename去掉带有路径的文件的路径部分。

如:

?View Code BASH1
2
# basename /home/onlyring/bdname.ksh
bdname.ksh