The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to Redirect the error messages from Syslog file to our own Application Log File balasubramaniam HP-UX 3 04-17-2008 01:44 PM
redirect input from file? bjornrud UNIX for Dummies Questions & Answers 1 03-09-2008 02:37 AM
redirect errors to log file gandolf989 Shell Programming and Scripting 0 02-26-2008 04:21 PM
redirect output to log file kalyanraj Shell Programming and Scripting 2 06-07-2007 12:40 AM
Redirect output to a file jimmyc UNIX for Dummies Questions & Answers 11 01-31-2007 11:34 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-04-2006
0ktalmagik 0ktalmagik is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 26
How to redirect std out and std err to same file

Hi

I want both standard output and standard error of my command cmd to go to the same file log.txt. please let me know the best commandline to do this.

Thanks
  #2 (permalink)  
Old 07-04-2006
sssow sssow is offline
Registered User
  
 

Join Date: Aug 2001
Posts: 179
cmd >log.txt 2>&1
Quote:
Originally Posted by 0ktalmagik
Hi

I want both standard output and standard error of my command cmd to go to the same file log.txt. please let me know the best commandline to do this.

Thanks
  #3 (permalink)  
Old 07-04-2006
0ktalmagik 0ktalmagik is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 26
Thanks. That works great!
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0