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. |
Hi, and welcome to LQ!
Quote:
Quote:
man bash /^REDIR And we don't do homework questions here ... ;} .... read the rules you agreed to again, please. Cheers, Tink |
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! |
"man proc" - it's basically stdin, stdout, stderr.
|
Quote:
Code:
lrwx------ 1 john john 64 Apr 21 16:37 0 -> /dev/tty1 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 |
Thanks a bunch guys... Linux has never been my strong suite, hence why I'm trying to beef up on it!
|
All times are GMT -5. The time now is 03:10 AM. |