Linux:关于标准输出的疑问?

创建文件xxxx,文件内容为字符串"Hello World"

 [root@localhost ~]# cat xxxx // 从文件获取标准输入
Hello World
[root@localhost ~]# cat < xxxx // 从文件获取标准输入
Hello World
[root@localhost ~]# cat // 发生阻塞,从键盘获取标准输入
Hello World
Hello World

但为什么使用tee时会阻塞呢?

 [root@localhost ~]# tee xxxx // 发生阻塞
[root@localhost home]# tee < xxxx // 从文件获取标准输入
Hello World

1、cat xxxx、cat < xxxx两种方式有什么区别吗?

2、预期效果是将xxxx的内容作为标准输入传给tee,再通过标准输出显示出来,但却发生了阻塞,通过man cat、man tee没看出为什么会产生这样的差别。

cat:连接stdin内容输出到stdout
tee:读取stdin内容输出到stdout
两个小疑惑:)

cat xxxx、cat < xxxx,前者是从文件读取,后者是从输入读取,区别在于后者输入的重定向
tee 命令是将标准输入拷贝到文件或标准输出
tee test.txt,会将你输入的内容存进text.txt文件顺便输出到屏幕上,所以会阻塞,等待输入
tee < test.txt,输入重定向,文件就成了标准输入
多看看命令的帮助信息就OK