Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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!
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.