Progweek1 Flashcards
(96 cards)
Unix was born in _
1973
Unix provides a _ between the _ and the _.
simple-to-use and powerful interface
user (the programmer)
hardware (the computer)
Unix was based on simple ideas:
1
2
3
4
- simple interface
- simple instructions that can be combined
- hierarchical file system
- independent from specific computer architectures
Since its development, Unix served as a _
base to develop operating systems
structure of systems developed by Unix:
⥐⥐⥐
1 ⇋ 2 ⇋ 3 ⇋ 4
1: user
2: shell
3: kernel
4: Hardware
2&&4: OS
The Unix shell is _.
It allows _.
an interface between the user and the operating system.
to run system commands.
why a shell?
- powerful: Allows to solve
many simple problems in a few
lines. - Fast && flexible: offers
a scripting language which
often results in faster solutions
to problems.
syntax of commands
<options><parameters>
</parameters></options>
what is the command to list ll the file and directories in my desktop
l s −a
command that shows you the manual of the
specific command
+give eg
man
eg: man ls)
To work with objects in the file system we use their paths. There are two
ways of expressing the path of a file:
- Absolute: Starting from the root, e.g.: /Users/Lorenzo/Desktop
- Relative: Starting from the current
position in the file system,
e.g.: ./Lorenzo/Desktop
“..”
meaning on the shell?
“the parent directory”
“.” meaning on the shell?
“this directory”
def of Files:
A sequence of bytes.
def of Path: (+eg)
The position in the file
system,e.g., /Users/Lorenzo/Desktop
def of Permission:
What can a user do with
the file read/write/execute for the owner,
owner group, everyone
hox to see permission on the shell?
use option ls -l
def of Directories:
A file that indexes other
files.
main ingredients of the file system:
- files
- path
- permission
- owner
- dimension
- last modified
- directories
list the files in dir
ls dir
count words in file
wc file
count characters in file
mc file
count lines in file
lc file
look for all the lines in the file that match the expression
grep expression file