CPSC 1280 Lecture Notes - Lecture 16: Readwrite, Unix Shell, The Terminal

25 views4 pages

Document Summary

Terminal: display, x window that emulates a terminal, keyboard. User: see command output and error messages from terminal, provide command input through terminal. Files associated with shell: perform terminal-related activity. Standard input: the file (or stream) representing input, connected to the keyboard. Standard output: the file (or stream) representing output, connected to the display. Standard error: the file (or stream) representing error messages that emanate from the command or shell, connected to the display. How shell handles files: a file is opened by accessing it by its pathname, opening returns a file descriptor (an integer, subsequent read/write operations on the file use the descriptor, kernel allocates lowest available number as descriptor. First three descriptors (0, 1 and 2) are always allocated: 0 standard input, 1 standard output, 2 standard error occurs in all processes. 73 109 2048 total: $ wc /etc/passwd.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents