【>】

定向输出:将命令输出定向输出到某个文件

用法:

[root@monitor sh]# ls
a            dir          mailadress                     maildeliver.sh.20110302154748  read.sh                       wc.sh
case.sh      diskinfo     maildeliver.sh                 maildeliver.sh.old             systeminfo.sh
content.txt  diskinfo.sh  maildeliver.sh.20110302120849  mailinfo                       systeminfo.sh.20110217095558
date.sh      ls.sh        maildeliver.sh.20110302131831  mj.sh                          systeminfo.sh.bak
[root@monitor sh]# echo ls>a
[root@monitor sh]# cat a
ls
[root@monitor sh]# ls >a
[root@monitor sh]# cat a
a
case.sh
content.txt
date.sh
dir
diskinfo
diskinfo.sh
ls.sh
mailadress
maildeliver.sh
maildeliver.sh.20110302120849
maildeliver.sh.20110302131831
maildeliver.sh.20110302154748
maildeliver.sh.old
mailinfo
mj.sh
read.sh
systeminfo.sh
systeminfo.sh.20110217095558
systeminfo.sh.bak
wc.sh

例子简单了点,为了看明白了。其实还有很多