LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-23-2006, 03:24 AM   #1
dezrik
LQ Newbie
 
Registered: May 2006
Posts: 3

Rep: Reputation: 0
Need Help With /proc Please!


Guys, I am having a bit of a trouble with working out what this means:

The following listing shows the content of the fd folder:
lrwx------ 1 john john 64 Apr 21 16:37 0 -> /dev/tty1
l-wx------ 1 john john 64 Apr 21 16:37 1 -> /dev/tty1
lrwx------ 1 john john 64 Apr 21 16:37 2 -> /dev/tty1

Guys, I can't work out what the 0, 1, and 2 (0 -> /dev/tty1) represent... could anyone help me out? I need it for my studies.

Also, if I ran a command like /usr/bin/myBinary > /home/john/output, what would that do? I'm new to /proc and am kinda swamped! Thanks guys.

Well that was a great n00b post, thanks Linux Masters.
 
Old 05-23-2006, 03:38 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi, and welcome to LQ!

Quote:
Originally Posted by dezrik
Guys, I am having a bit of a trouble with working out what this means:

The following listing shows the content of the “fd” folder:
lrwx------ 1 john john 64 Apr 21 16:37 0 -> /dev/tty1
l-wx------ 1 john john 64 Apr 21 16:37 1 -> /dev/tty1
lrwx------ 1 john john 64 Apr 21 16:37 2 -> /dev/tty1

Guys, I can't work out what the 0, 1, and 2 (0 -> /dev/tty1) represent... could anyone help me out? I need it for my studies.
In that case you should probably ask your teacher?


Quote:
Originally Posted by dezrik
Also, if I ran a command like /usr/bin/myBinary > /home/john/output”, what would that do? I'm new to /proc and am kinda swamped! Thanks guys.

Well that was a great n00b post, thanks Linux Masters.
Read
man bash
/^REDIR

And we don't do homework questions here ... ;} .... read the
rules you agreed to again, please.


Cheers,
Tink

Last edited by Tinkster; 05-23-2006 at 03:39 AM.
 
Old 05-23-2006, 03:54 AM   #3
dezrik
LQ Newbie
 
Registered: May 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Sorry mate, it's not for homework or anything, it's a combination of an old assignment question I never answered and something I am trying to do myself for my linux boxes I've been setting up (and need a better understanding of /proc to do correctly!)

(By studies I meant studies I am undertaking myself to expand on what I have learnt previously.)

I'm just intrigued to find out what it actually means, particularly the numbers as I can't find reference to them anywhere (the numbers at the end of the statment that is.) So if anyone would be kind enough to tell me what those numbers are so I'm not left staring at my little linux box on the floor trying to decipher what they are for the next three hours I'd be forever greatful!

Last edited by dezrik; 05-23-2006 at 03:55 AM.
 
Old 05-23-2006, 04:02 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,050

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
"man proc" - it's basically stdin, stdout, stderr.
 
Old 05-23-2006, 04:03 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by dezrik
Sorry mate, it's not for homework or anything, it's a combination of an old assignment question I never answered and something I am trying to do myself for my linux boxes I've been setting up (and need a better understanding of /proc to do correctly!)

(By studies I meant studies I am undertaking myself to expand on what I have learnt previously.)
I see. In that case :}

Code:
 lrwx------ 1 john john 64 Apr 21 16:37 0 -> /dev/tty1
 l-wx------ 1 john john 64 Apr 21 16:37 1 -> /dev/tty1
 lrwx------ 1 john john 64 Apr 21 16:37 2 -> /dev/tty1
0 is STDIN
1 is STDOUT
2 is STDERR

Basically those fd entries you find under the varied PIDs
in proc tell you what the process is using as a FileDescriptor
for the three things mentioned above.

man 5 proc
/fd
for details ... :}



Cheers,
Tink
 
Old 05-23-2006, 04:36 AM   #6
dezrik
LQ Newbie
 
Registered: May 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks a bunch guys... Linux has never been my strong suite, hence why I'm trying to beef up on it!
 
  


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
hidden directories under proc... what are they for? : (/proc/.23142) syssyphus Linux - General 1 04-10-2006 04:23 PM
/proc vishalbutte Programming 11 02-24-2006 01:50 AM
how to know contents of /proc/ide/hda/smart_values and /proc/ide/hda/smart_threshold Prassanta SUSE / openSUSE 0 02-23-2006 05:21 AM
Correlation between /proc/devices and /proc/modules ColinLadyka Linux - General 1 02-13-2006 06:25 PM
What /proc proc file do I need? GoboFraggle Programming 1 02-05-2003 12:52 AM


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