“>”:把正确结果输出到一个文件
[[email protected] ~]# ls > 1 [[email protected] ~]# cat 1 1 anaconda-ks.cfg install.log install.log.syslog shell
“>>”:把正确结果追加输出到一个文件
[[email protected] ~]# ls >>1
“&”把错误和正确结果都输出
[[email protected] ~]# lsd &>>1 注意:&与>>中间无空格 [[email protected] ~]# cat 1 1 anaconda-ks.cfg install.log install.log.syslog shell -bash: lsd: command not found
/dev/null 回收站
[[email protected] ~]# cat 1 >/dev/null
时间: 2024-09-29 21:29:19