LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Stdout (https://www.linuxquestions.org/questions/linux-general-1/stdout-564946/)

SlacUser 06-27-2007 05:55 PM

Stdout
 
I want to check if my file system is alright
I run fsck /dev/sda8, and the result went to the stdout file

Now I want to check the stdout file with the cat command, but it get stuck, after several minutes and didn't show anything.

Is there a especial way to read the file or what??

pixellany 06-27-2007 06:40 PM

I have never seen a "stdout" file.

If you run a command in a terminal, "standard output" is the terminal---ie it displays on the screen. If you have a file named "stdout", how big is it? Does it have ANY data?

To purposely put the output of fsck into a file:

fsck /dev/sda8 >filename 2>&1 (this sends (re-directs) stdout to filename, and sends stderr to the same place)

SlacUser 06-27-2007 07:02 PM

Quote:

fsck /dev/sda8 >filename 2>&1 (this sends (re-directs) stdout to filename, and sends stderr to the same place)
Thanks!! I'll try with that

I'll post the results later =)

timmeke 06-28-2007 06:54 AM

Note that there is actually a file called "stdout". It's in /dev and is a special device file.
Any text sent into this file gets printed on your shell's stdout (terminal typically).

"cat /dev/stdout" doesn't do much good, since "cat" will try to read from a device that's normally used for writing (ie writing to your terminal window) only.

pixellany 06-28-2007 09:07 AM

Quote:

Originally Posted by timmeke
Note that there is actually a file called "stdout". It's in /dev and is a special device file.
Any text sent into this file gets printed on your shell's stdout (terminal typically).

"cat /dev/stdout" doesn't do much good, since "cat" will try to read from a device that's normally used for writing (ie writing to your terminal window) only.

Aha!!!!
If that is the file he was looking at, it all makes sense. OP--where are you??


All times are GMT -5. The time now is 03:42 AM.