~/ learn/ comp-325/ cards/ Three files are already open
1 of 8

The three standard files, seen as files

The three standard files, seen as files

Answer

ls -l /dev/fd/ echo hello > /dev/fd/1 echo trouble > /dev/fd/2

The listing shows one entry per open descriptor of the process that ran ls. Writing to /dev/fd/1 and /dev/fd/2 by name does exactly what an ordinary write to stdout and stderr does — both arrive on your terminal.

Linux proc(5), fd(4)

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/9f005c72-f074-4ef3-b429-10605cbe758c/flashcard utf-8 LF