LinuxQuestions.org
Help answer threads with 0 replies.
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 05-14-2009, 11:46 PM   #1
xskycamefalling
Member
 
Registered: May 2009
Posts: 43

Rep: Reputation: 15
how to tell if a file is outputing to STDOUT or STDERR?


hi im wondering about STDOUT or STDERR i have a file that outputs to the scren but i want to know if its STDOUT or STDERR..

thanks
 
Old 05-15-2009, 12:05 AM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,830

Rep: Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409
???
program option1 opiton2 > filename.txt
 
Old 05-15-2009, 12:13 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
program 1>stdout.log 2>stderr.log

then examine the logs
 
Old 05-15-2009, 12:27 AM   #4
xskycamefalling
Member
 
Registered: May 2009
Posts: 43

Original Poster
Rep: Reputation: 15
program 1>stdout.log 2>stderr.log

then examine the logs


when i do this i get the following error


-bash: stdout.log: Permission denied
 
Old 05-15-2009, 12:30 AM   #5
xskycamefalling
Member
 
Registered: May 2009
Posts: 43

Original Poster
Rep: Reputation: 15
when i cat stderr.log i get
-bash: mystery: command not found
 
Old 05-15-2009, 01:52 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
For the first error it looks like your disk is read only.
I think we need more details.

What exactly is the cmd you are issuing?
Show the ownerships/perms ie 'ls -l'

What distro & version?

Show contents of /etc/mtab & say which disk you are on.
Which user are you running it as?
 
  


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
Cannot redirect all stdout and stderr into file hawkgao Programming 2 05-12-2009 10:14 AM
send stderr to a file and also to stdout pranavchoudhary Linux - Newbie 7 08-25-2008 02:57 AM
Shell script - stdout & stderr to terminal and file jantman Linux - Software 1 12-07-2006 05:34 PM
redirecting stdout to /dev/null and stderr to stdout? Thinking Programming 1 05-18-2006 03:36 AM
redirecting stdout and stderr to a file Avatar33 Programming 4 03-12-2005 08:55 AM


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

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