Re: linux 'find' command
by Hugo van der Sanden at 01:28 07/08/05 (Forum::Technical Advice::General)
Each process starts with three file descriptors ('fd's) set up: standard input, output and error streams (called 'stdin', 'stdout' and 'stderr' respectively) are always fd 0, fd 1 and fd 2 in that order, and for a simple shell command each of them is linked to the terminal.

By default, the shell applies '<' to fd 0 and '>' to fd 1, but you can override that by putting the numbers in. You can do funkier things like redirect one stream to another (eg find . 2>&1 | less lets you pipe the combined output and error streams into a pager).

Though the underlying file descriptors are supplied by the OS, these mechanisms for manipulating them are part of the shell - look at the 'bash' manpage for FMTYEWTK.

Hugo

<< CafePress for the UK (again) Trivial, I thought. >>
Powered by
Powered by Novacaster