2012-03-01 43 views

回答

6

使用tee

# This way you will see the output. 
ls /tmp | tee file1.txt file2.txt 

# With this line you won't. 
ls /tmp | tee file1.txt file2.txt >/dev/null 
3

您可以使用三通ls /tmp | tee -a a.txt b.txt

编辑:没关系DarkDust战争快:)

1

除了其他建议的方法之外,您还可以在执行ls之后仅输出输出文件。

相关问题