What does 2>&1 | tee mean?“brew formula” installation logsWhat does the @ sign and the number next to it mean in ls -l display?What does error “the Classic Environment is no longer supported” mean?What does a hard link do?What is “TALagent” and why is it “Exiting out of boredom”?What is wrong in this command about grepping and pandocing?What does “is not recognized as an internal or external command” error mean?What exactly does “out of application memory” mean?Unable to brew install wineterminal script to search CSV fileRe-installation from the internet fails with error code -2005F, what does it mean?
Does Hubble need to dump momentum of its reaction wheels?
Do equal angles necessarily mean a polygon is regular?
How can Charles Proxy change settings without admin rights after first time?
Going to get married soon, should I do it on Dec 31 or Jan 1?
Procedurally generate regions on island
What are the penalties for overstaying in USA?
Architecture of networked game engine
Syntax Error with 'if'
Why isn’t the tax system continuous rather than bracketed?
"It will become the talk of Paris" - translation into French
How to append a matrix element by element?
Should my manager be aware of private LinkedIn approaches I receive? How to politely have this happen?
Does image quality of the lens affect "focus and recompose" technique?
Could Sauron have read Tom Bombadil's mind if Tom had held the Palantir?
Why is C++ initial allocation so much larger than C's?
How many codes are possible?
Was touching your nose a greeting in second millenium Mesopotamia?
Find smallest index that is identical to the value in an array
How come I was asked by a CBP officer why I was in the US?
How can I set command-line parameters through `.emacs` file?
Why does the A-4 Skyhawk sit nose-up when on ground?
Why aren't (poly-)cotton tents more popular?
How to determine what is the correct level of detail when modelling?
Pull-up sequence accumulator counter
What does 2>&1 | tee mean?
“brew formula” installation logsWhat does the @ sign and the number next to it mean in ls -l display?What does error “the Classic Environment is no longer supported” mean?What does a hard link do?What is “TALagent” and why is it “Exiting out of boredom”?What is wrong in this command about grepping and pandocing?What does “is not recognized as an internal or external command” error mean?What exactly does “out of application memory” mean?Unable to brew install wineterminal script to search CSV fileRe-installation from the internet fails with error code -2005F, what does it mean?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I read the answer by @grg to question “brew formula” installation logs:
brew install <formula> 2>&1 | tee install.log
So where exactly is this install.log file going to end up, and what exactly the 2>&1 | tee
part of the command mean?
macos unix
New contributor
add a comment |
I read the answer by @grg to question “brew formula” installation logs:
brew install <formula> 2>&1 | tee install.log
So where exactly is this install.log file going to end up, and what exactly the 2>&1 | tee
part of the command mean?
macos unix
New contributor
add a comment |
I read the answer by @grg to question “brew formula” installation logs:
brew install <formula> 2>&1 | tee install.log
So where exactly is this install.log file going to end up, and what exactly the 2>&1 | tee
part of the command mean?
macos unix
New contributor
I read the answer by @grg to question “brew formula” installation logs:
brew install <formula> 2>&1 | tee install.log
So where exactly is this install.log file going to end up, and what exactly the 2>&1 | tee
part of the command mean?
macos unix
macos unix
New contributor
New contributor
edited 5 hours ago
Fortnite Lucifer
New contributor
asked 8 hours ago
Fortnite LuciferFortnite Lucifer
133 bronze badges
133 bronze badges
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
The
tee
command prints the piped stdout to the file path given as well as displaying it in the terminal. This is commonly used for recording the output of commands to file which would otherwise only be ephemerally printed to the terminal.Without tee and using simple redirection of
brew install > install.log
would prevent stdout being printed to the terminal as well as the file, requiring the file to be accessed to view the messages.2>&1
redirects stderr to stdout alongside the existing stdout, meaning that the error messages are redirected as normal output.Without this, tee would only print stdout without the error messages to the install log.
install.log is relative to the current directory.
add a comment |
2>&1
means "send any error messages (aka 'stderr') to the same output as any informational messages (aka 'stdout")."
And
| tee install.log
means "whatever output there is should also be sent to the file install.log
.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The
tee
command prints the piped stdout to the file path given as well as displaying it in the terminal. This is commonly used for recording the output of commands to file which would otherwise only be ephemerally printed to the terminal.Without tee and using simple redirection of
brew install > install.log
would prevent stdout being printed to the terminal as well as the file, requiring the file to be accessed to view the messages.2>&1
redirects stderr to stdout alongside the existing stdout, meaning that the error messages are redirected as normal output.Without this, tee would only print stdout without the error messages to the install log.
install.log is relative to the current directory.
add a comment |
The
tee
command prints the piped stdout to the file path given as well as displaying it in the terminal. This is commonly used for recording the output of commands to file which would otherwise only be ephemerally printed to the terminal.Without tee and using simple redirection of
brew install > install.log
would prevent stdout being printed to the terminal as well as the file, requiring the file to be accessed to view the messages.2>&1
redirects stderr to stdout alongside the existing stdout, meaning that the error messages are redirected as normal output.Without this, tee would only print stdout without the error messages to the install log.
install.log is relative to the current directory.
add a comment |
The
tee
command prints the piped stdout to the file path given as well as displaying it in the terminal. This is commonly used for recording the output of commands to file which would otherwise only be ephemerally printed to the terminal.Without tee and using simple redirection of
brew install > install.log
would prevent stdout being printed to the terminal as well as the file, requiring the file to be accessed to view the messages.2>&1
redirects stderr to stdout alongside the existing stdout, meaning that the error messages are redirected as normal output.Without this, tee would only print stdout without the error messages to the install log.
install.log is relative to the current directory.
The
tee
command prints the piped stdout to the file path given as well as displaying it in the terminal. This is commonly used for recording the output of commands to file which would otherwise only be ephemerally printed to the terminal.Without tee and using simple redirection of
brew install > install.log
would prevent stdout being printed to the terminal as well as the file, requiring the file to be accessed to view the messages.2>&1
redirects stderr to stdout alongside the existing stdout, meaning that the error messages are redirected as normal output.Without this, tee would only print stdout without the error messages to the install log.
install.log is relative to the current directory.
answered 8 hours ago
grg♦grg
141k25 gold badges224 silver badges333 bronze badges
141k25 gold badges224 silver badges333 bronze badges
add a comment |
add a comment |
2>&1
means "send any error messages (aka 'stderr') to the same output as any informational messages (aka 'stdout")."
And
| tee install.log
means "whatever output there is should also be sent to the file install.log
.
add a comment |
2>&1
means "send any error messages (aka 'stderr') to the same output as any informational messages (aka 'stdout")."
And
| tee install.log
means "whatever output there is should also be sent to the file install.log
.
add a comment |
2>&1
means "send any error messages (aka 'stderr') to the same output as any informational messages (aka 'stdout")."
And
| tee install.log
means "whatever output there is should also be sent to the file install.log
.
2>&1
means "send any error messages (aka 'stderr') to the same output as any informational messages (aka 'stdout")."
And
| tee install.log
means "whatever output there is should also be sent to the file install.log
.
answered 8 hours ago
TJ LuomaTJ Luoma
12k3 gold badges40 silver badges81 bronze badges
12k3 gold badges40 silver badges81 bronze badges
add a comment |
add a comment |