Operating Sys. Quiz 2 Flashcards
Difference between “normal” user and “super-user/root”
- “normal” users with a limited set of privileges on the system
- “root” user is the system admin
What is the shell?
The shell is essentially a program that allows you to launch other programs
What symbol is used for normal users and what symbol is used for root users
$ or % for normals users
# for root users
What do command-line programs receive their inputs and outputs from
stdin for inputs
stdout to write their output
How can you redirect stdin and stdout
with the < (input) and > (output) redirection operators
what does wc -l my file > output.txt do?
sends the output of the wc command to a file called output.txt
What do we call “folders” in Finder and similar graphical file navigation tools?
Directories
How can every file or directory in the filesystem can be located?
Using its full path name
What does pwd, ls and cd do?
- pwd stands for “print working directory”
- ls stands for list the files. Use ls -l to get a “long” detailed listing
- cd stands for “change directory”.
What is a shell wildcard?
A wildcard is a symbol that represents a group pf characters in a filename.
The bash offers two wildcards: “*” and “?”
What is the difference between the :*” wildcard and the “?” wildcard.
“*” wildcard is a stand-in for zero or more consecutive characters
“?” wildcard is a stand-in for a single character
What does echo * do? What about echo../???
- list all the files ( and directories) in the current directory
-lists all the 3 letter files in the parent directory
How do you find the search path
Type “echo path” to display the places the shell searches when you type a command
What are pipes?
”|”, pipes allow you to redirect the output of one program and make it the input of another
What does ls -l *.txt | wc -l do?
this lists all .txt file one line at a time. wc then counts the number of input lines