Home

fd1

fd1 is a shorthand used in computing to denote the first file descriptor, which on most Unix-like systems corresponds to standard output.

File descriptors are non-negative integers that index into a per-process table of open files, pipes, and other

In shells and programming, redirection operators manipulate fd1. For example, in a POSIX shell, command > file

In software design, fd1 is an implementation detail for low-level I/O. Many languages expose higher-level streams

See also: file descriptor, standard streams, I/O redirection.

I/O
resources.
By
convention,
0
is
standard
input,
1
is
standard
output,
and
2
is
standard
error.
The
descriptor
1,
or
fd1,
is
what
a
process
uses
when
it
writes
to
the
terminal
or
to
any
destination
if
stdout
is
redirected.
redirects
stdout
to
file.
You
can
also
duplicate
or
reassign
stdout
using
additional
descriptors,
such
as
exec
3>&1
to
save
a
copy
of
stdout
to
fd3,
and
later
exec
1>&3
to
restore
it.
or
file
objects
instead
of
raw
descriptors,
and
not
all
platforms
use
0,
1,
and
2
in
the
same
way.
Windows
uses
a
different
handle
model,
though
analogous
concepts
exist.