LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   Gentoo install video question. (https://www.linuxquestions.org/questions/gentoo-87/gentoo-install-video-question-737253/)

barn63 07-02-2009 01:51 PM

Gentoo install video question.
 
This maybe a dumb question but I was watching a video on youtube for the Gentoo minimal install. The user who posted the video uses the command "emerge gentoo-sources 2>&1 >/dev/null". What does "2>&1 >/dev/null" do?


Here is the video I am referring to.

i92guboj 07-02-2009 03:26 PM

Quote:

Originally Posted by barn63 (Post 3594601)
This maybe a dumb question but I was watching a video on youtube for the Gentoo minimal install. The user who posted the video uses the command "emerge gentoo-sources 2>&1 >/dev/null". What does "2>&1 >/dev/null" do?


Here is the video I am referring to.

It redirects stdout and stderr to /dev/null. In other words, you won't see any output on the screen, not even errors. Not a good thing if there's an error that needs attention.

At most, I'd only recommend ">/dev/null". And only if you know what you are doing (tm). All the output to the screen takes some time, and for the kernel this is specially true because there are lots of files that needs to be unpacked. But a few extra seconds and some extra cpu usage don't justify the redirection nor the extra typing, in my humble opinion.

d2_racing 07-02-2009 04:14 PM

In fact, you really need the error message and all kind of stuff that portage will send to the screen.

I will never use this kind of tweak.

NathanZachary 07-03-2009 10:10 AM

Calling this a "tweak" scares me a little bit :p. Just to iterate what the others have said, don't redirect stderr unless you would like some problems later. ;)

jomen 07-21-2009 03:55 AM

Thread is a bit old, but nonetheless:
I think the redirecting thing was done for the video - it is very much info in a short time already even without all the compiler output.
It can be useful to do something like this (on slow terminals or while using remote connections - it makes a sometimes huge difference).
It is even configurable via /etc/make.conf with:
Code:

EMERGE_DEFAULT_OPTS="--nospinner --quiet"
No info is lost, errors are still shown - and there are always the emerge-logs in /var/log/portage...

[edit] the kernel compilation is the only thing this setting has no effect on - redirecting some output, like said above, to have less messages on screen may be useful here


All times are GMT -5. The time now is 07:12 PM.