CS246 Lecture Notes - Lecture 1: Uniq, Chmod, Standard Streams

61 views4 pages

Document Summary

Get the os to do things: run programs, manage files. Login and type echo sh -bash chsh to change shell. In linux, directories are considered as a kind of file cat. Display the contents of a file cat /usr/share/dict/words. Stop the program (^c) ls ls -a pwd. Gobbing pattern * = match any sequence of chars (more on linux sheet) Shell finds all files in current directory that match the pattern and substitute them onto the command line. => wc a. txt b. txt c. txt - opens all three and display wc. Executes command args and captures the output in file instead of the screen. Passes the name as an argument to cat. The shell opens the file and passes the contents to cat in place of keyboard. Every program is attached to 3 streams stdin -> program -> stderr/stdout. By default, stdin = keyboard, stderr/stdout = screen. Redirection: stdin < stdout > stderr 2> stderr.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents