Stack Overflow About Products For Teams: Join Stack Overflow To Learn, Share Knowledge, and Build Your Career
Stack Overflow About Products For Teams: Join Stack Overflow To Learn, Share Knowledge, and Build Your Career
Stack Overflow About Products For Teams: Join Stack Overflow To Learn, Share Knowledge, and Build Your Career
1. About
2. Products
3. For Teams
2.
3.
Join Stack Overflow to learn, share knowledge, and build your career.
1.
Home
2.
1. Public
2.
2. Stack Overflow
3.
Tags
4.
Users
5. Find a Job
6.
Jobs
7.
Companies
1.
Teams
What’s this?
2.
3.
2.
Create a Team
I want to pipe stdout to multiple files, but keep stdout itself quiet. tee is close but it prints to
both the files and stdout
3
In tee aa bb cc, tee has to write 3 files, and you still have bash redirecting standard
output to a file. In tee aa bb > cc, you have the bash redirect, but tee only needs to
write to 2 files. I'd say the 2nd is more efficient, but only in the strictest sense; you'll
never notice the difference. – chepner Mar 7 '13 at 13:39
Add a comment
2 Answers
17
anishsane
17.4k55 gold badges3232 silver badges6262 bronze badges
Add a comment
5
or by closing stdout.
Be however aware that you will get either tee: standard output: No space left on
device or tee: standard output: Bad file descriptor warnings.
Share
Improve this answer
Follow
edited Jan 31 '19 at 21:08
answered Nov 20 '15 at 2:03
Jirka
10711 silver badge33 bronze badges
1
2
Not. it's indeed /dev/full so that the pipe is closed. With /dev/null, tee will still
continue to write, even if there is no space left for files aa, bb and cc. – Jirka Jan 31 '19
at 21:08
Add a comment
Your Answer
Sign up or log in
Post as a guest
Name
By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie
policy
Why are video calls so tiring? You might be misreading cultural styles
Featured on Meta
Opt-in alpha test for a new Stacks editor
Visual design changes to the review queues
Related
118
How do I get both STDOUT and STDERR to go to the terminal and a log file?
1116
How to redirect output to a file and stdout
736
Redirect stderr and stdout in Bash
3445
How do I tell if a regular file does not exist in Bash?
1047
Pipe to/from the clipboard in Bash script
1619
How to redirect and append both stdout and stderr to a file with Bash?
1051
How can I pipe stderr, and not stdout?
249
How to pipe stdout while keeping it on screen ? (and not to a output file)
2
Send stdout to file no tee
0
Bash redirections. Stdout to shell and stdout+stderr to file
Stack Overflow
Questions
Jobs
Developer Jobs Directory
Salary Calculator
Help
Mobile
Disable Responsiveness
Products
Teams
Talent
Advertising
Enterprise
Company
About
Press
Work Here
Legal
Privacy Policy
Terms of Service
Contact Us
Stack Exchange
Network
Technology
Life / Arts
Culture / Recreation
Science
Other
Blog
Facebook
Twitter
LinkedIn
Instagram
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa.
rev 2021.2.12.38568