Solved

how to find what is printed to the UNIX STDOUT

Posted on 2014-01-18
7
511 Views
Last Modified: 2014-01-20
Hello,

how to find what is printed to the UNIX STDOUT?

Thanks
0
Comment
Question by:bibi92
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 39790867
> stdout.log
0
 
LVL 19

Accepted Solution

by:
Patricksr1972 earned 500 total points
ID: 39790872
Hi

Not totally confident i understand the question, you want to know what has been printed to the stdout?

A command like    cat /dev/stdout -less

Will show you its content. OR am i missing the issue here?
0
 

Author Comment

by:bibi92
ID: 39790928
yes, I want to know what has been printed to the stdout
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:bibi92
ID: 39790929
cat: 0652-050 Cannot open /dev/stdout.
cat: 0652-050 Cannot open -less.
0
 
LVL 84

Expert Comment

by:ozo
ID: 39790942
stdout will be what is printed on the screen.
If you want to see what was printer their earlier, scroll up.
If you want to capture what what a command prints, redirect it to a file or logger
command | tee command.log
0
 
LVL 19

Expert Comment

by:Patricksr1972
ID: 39790981
If you cannot open the file you probably have no forwarder in place and then standard output is printed to the screen.
0
 
LVL 8

Expert Comment

by:Surrano
ID: 39793687
You can always check whichever process you want if you know the pid (e.g. $MYPID)

tail -f /proc/$MYPID/fd/1 # stdout
tail -f /proc/$MYPID/fd/2 # stderr

Open in new window


But it'll show only future output, not past output.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question