UNIX Flashcards
UNIX
- Multi-user, multi-tasking operating system
- architecture-independent operating system (can work on most things)
History
A&T labs -Thomson and Ritchie 1970 -academic research operation system -first “portable” (take from one system to another) Berkeley standard distribution -cheap, first standard network support -Linux, CentOS7 Android -intro in 2008 -uses Linux/ UNIX
Pros and cons of UNIX when made
Pros: flexible, extensive (add new pieces), file sharing
Cons: security, robustness, performance
Why use UNIX
Multiuser
- remote processing (use in background)
- stable (safe)
- highly modular (how we group functionality together and how we use it)
- some free (open source)
- large user community
- “tools are mature” (have become efficient, usable)
Kernel
- the brain of the system, communication with devices
- is protected core of the OS
- large and complex
- memory allocation, file system
Shell
- responsible for communication between user and hardware
- job control (scheduling tasks)
- many shells (sh, bash, ksh)
- interprets your typed commands in order of what you want
File system
- organization of files
- mapping blocks of data from physical storage onto logical blocks users can manipulate
- arranged in tree like structures
File
An abstraction that allows us to understand it but to the computer it’s just data or memory
Directories
- just reference where a file is
- special kind of file and format
- working directory is where we are currently relative pathnames are worked in relation to working directory
File attributes
- every file/directory has attributes
- such as username, file size, file type, permissions
Input/ output streams
- has three streams
- standard input/ stdin: defaults to the console keyboard
- standard output/ stdout: defaults to the console screen
- standard error/stderr: defaults to the console screen
- shell provides a mechanism for overriding this default behaviour (stream redirection)
Stream redirection
Mechanism for overriding default streams
-take input from file cmd output to a file
Pipes
- are considered by many to be on of innovations
- route standard output from cmd into input of another cmd
- symbol: |
- able to combine efficiently
- “generator” starts at the head
- eliminates intermediate files
- all cmds run at same time but one error all fails
Command sequencing
- multiple commands can be executed sequentially
- ex) date;who;pwd
- you can group commands together and redirect the output
Quoting
Strong: all chars inside single pair of quotes are preserved
Weak: some char($,’) inside (“”) are interpreted by the shell
Back: substitute result of evaluation as a command