LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-30-2009, 01:04 AM   #1
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Fedora 9
Posts: 192

Rep: Reputation: 30
Question Please explain this :./install >install.log 2>& 1


Hello,
I know that to redirect the output of a command (in terminal) to a file we can use '>' like :
Quote:
./install > install.log
Recently I saw this:
Quote:
./install >install.log 2>& 1
Kindly explain what does the red portion do:
Quote:
./install >install.log 2>& 1
Thanks
 
Old 12-30-2009, 01:09 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Redirects standard error to standard out and therefore into install.log.

Cheers,

Evo2.
 
1 members found this post helpful.
Old 12-30-2009, 05:56 AM   #3
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Fedora 9
Posts: 192

Original Poster
Rep: Reputation: 30
Thanks evo2...
Any more explanations ???
like what does '2', '>', '&' and '1' etc signify separately..??
BTW I have come to know that '&' is used to execute a command in the background environment.

Last edited by mq15; 12-30-2009 at 05:58 AM.
 
Old 12-30-2009, 06:06 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
"2" is std error and "1" is std out. Details on redirection can be found in th "REDIRECTION" section in the bash man page (I'm not yelling - section title is capitalized). '>&' is a distinct entity, not a compound form of '&' and '>'.

Cheers,

Evo2.
 
2 members found this post helpful.
Old 12-30-2009, 08:13 AM   #5
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Fedora 9
Posts: 192

Original Poster
Rep: Reputation: 30
Humm..Thanks a lot evo2..
Have nice days ahead..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Uncertain how to configure/install packages & compiler before install VMware on FC8. Azazwa Linux - Newbie 1 03-28-2009 08:27 PM
Can anyone explain these /var/log/messages ErrorBound Linux - Kernel 6 03-05-2007 12:34 AM
Log entry: can someone explain this? future assassin Slackware 3 11-22-2005 03:46 AM
Can anyone explain how to install wxPython? frycarson Linux - Newbie 11 09-14-2003 03:44 PM
Can anyone explain how to install a program hextex Linux - Newbie 1 04-17-2001 04:04 PM


All times are GMT -5. The time now is 04:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration