标签:
1、输出重定向
[root@centos ~]# ls
aa anaconda-ks.cfg httpd-2.2.9 install.log japan
abc dfeww httpd-2.2.9.tar.gz install.log.syslog xdl
[root@centos ~]# ls > aa
[root@centos ~]# cat aa
aa
abc
anaconda-ks.cfg
dfeww
httpd-2.2.9
httpd-2.2.9.tar.gz
install.log
install.log.syslog
japan
xdl
[root@centos ~]# pwd > aa
[root@centos ~]# cat aa
/root
[root@centos ~]#
[root@centos ~]# ls >> aa
[root@centos ~]# cat aa
/root
aa
(连接上面的代码,将ls命令执行的日志追加到aa文件里)abc
anaconda-ks.cfg
dfeww
httpd-2.2.9
httpd-2.2.9.tar.gz
install.log
install.log.syslog
japan
xdl
[root@centos ~]# pwd >> aa
[root@centos ~]# cat aa
/root
aa
abc
anaconda-ks.cfg
dfeww
httpd-2.2.9
httpd-2.2.9.tar.gz
install.log
install.log.syslog
japan
xdl
/root(本次追加的内容)
标签:
原文地址:http://www.cnblogs.com/lxw89/p/4683063.html