Tekstmanipulatie, week 1

General Introduction

What is a computer in fact?

Main characteristics of a computer:

John v. Neumann - Herman Goldstine (1948): binary system + controled by a program

Several levels between the machine and the user:

Why using PC's at post offices or for typing simple letters? The advantages of this kind of modularity are: ... therefore wider market to sell them, so they are cheaper.


Unix as an operating system. And also a culture, a way of thinking. Starting at AT&T, in 1969... standards and plenty of variations (LINUX).

(Miles Osborne's Unix slides.)

The Unix philosophy:

The User

Logging in, login name, password, changing password ('passwd'), loging out ('logout', 'exit', ^d)
Root privileges vs. 'regular users'.

Unix shells

A shell is really the envelope around the computer: it receives the commands and executes them. How does it work? Different types of shells [different kinds of prompts]: Korn shell (ksh) [%], C-shell (Csh) [$], Bourne shell [$], Bourne Again shell (bash) [>]

(Additional information possibly before the prompt.)

The Bash-shell is practical, saves you typing a lot:
- cursur up: previous commands
- TAB: fills in the file names, if there is only one possibility
- TAB TAB: if there are more possibilities, you can get a list of them by typing TAB a second time

Unix commands

The general syntax of them is:

command [-options] [arguments]

Remark: [...] always means that this part is optional. What means e.g. abc [de [fg]] ?

Getting help / information about a given command:

man <command's_name>
<command's_name> - -help | more
The UNIX file system

What is a file? ...
Finding the needed one out of thousand ones...
Everything is a hierarchical tree: root + branches (=directories) + leaves (=files).
Path. Absolute and relative paths.

    /...        : the root directory
    .../...     :  subdirectories (cf. \ in DOS!)
    ~          : home directory (crucial border between the system and the user)
    .           :  the actual working directory
    ..          : the parent directory of .
    ../..       : grand-parent, etc.

    /abc     : a file in the root directory
   ~/abc    : a file in my home directory
    ./abc     : a file in the actual working directory
    ../abc    : a file in the parent directory of the actual working directory.

'pwd' : print working directory
'ls' : list
mkdir : make directory
cd : change (working) directory
cat: catenate (concatenate) (lat. catena = 'chain') : use now this to create the simplest files.

An important principle in Unix: EVERYTHING IS A FILE!

Directories are files.
Drives are also files (directories) within the same hierarchy (e.g. /media/floppy/) (unlike DOS, like Windows).
The "screen" is also a file (e.g. /dev/tty1 or /dev/pts/1).
This principle will be very important when speaking of pipes.

A few important remarks about file names: