LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-27-2007, 05:55 PM   #1
SlacUser
Member
 
Registered: Apr 2007
Location: México
Distribution: Slackware, Fedora
Posts: 61

Rep: Reputation: 15
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??
 
Old 06-27-2007, 06:40 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740
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)
 
Old 06-27-2007, 07:02 PM   #3
SlacUser
Member
 
Registered: Apr 2007
Location: México
Distribution: Slackware, Fedora
Posts: 61

Original Poster
Rep: Reputation: 15
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 =)
 
Old 06-28-2007, 06:54 AM   #4
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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.
 
Old 06-28-2007, 09:07 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740
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??
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
redirecting stdout to /dev/null and stderr to stdout? Thinking Programming 1 05-18-2006 02:36 AM
/dev/stdout nbframer Linux - Newbie 6 09-10-2005 04:48 PM
what is stdout stefaandk Linux - Newbie 1 09-06-2005 07:20 PM
stdout with tk? sk8guitar Programming 1 07-30-2003 02:48 PM
#@!?£$# stdout problem!! beedyrazzle Linux - Newbie 3 01-21-2003 08:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:11 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