Linux-concepts: file systems, shells, processes

filesystems (local, nfs)

node, root (/), tree structure, directories, files

The home directories are not stored on each respective workstation in the local filesystem (local), but via network file system (nfs) on the file and backup server pan.

  • standard directories: /bin, /dev, /etc, /lib, /usr, /usr/bin, /usr/lib, /usr/tmp, /tmp
  • additional directories: /fibus, /usertemp, /usr/local, /progsys
  • directory shortcuts: Homedir. (~), Workingdir. (.), Upper Workingdir. (..)
  • files: ASCII (Text, Postscript), binary (executables, graphics)

shells

command interpreter (bash), shell variables (printenv)

Example - Listing the home direcory: ls -al ~

information:

  • man shows command manual pages, e.g.: man finger, man -k fortran
  • finger lists user-specific system information
  • who lists users logged-in
  • wc counts characters, words and rows in a file
files:
  • df lists mounted filesystem (kbytes)
  • du lists occupied disk space (kbytes)
  • pwd lists path of current working directory
  • ls lists directory/file details
  • cd changes directory, e.g.: cd ..
  • mkdir creates a directory, e.g.: mkdir test
  • cp copies directories/files, e.g.: cp name1 name2
  • mv renames directories/files, e.g.: mv name1 name2
  • rm deletes directories/files, e.g.: rm name
  • cat lists contents of a textfile, e.g.: cat name
  • chmod changes file access permissions, pattern: read r, write w, execute x depending on user u, group g, others o. examples:
    • remove read premission for others: chmod o-r name
    • grant write permission to group: chmod g+w name
    • simplified using octal numbers: 4 (r), 2 (w), 1 (x), examples:
    • rwx for user, r-x for group, --- for others: chmod 750 name
  • Note: To include subdirectories, use '-r' for rm and cp and '-R' for chmod.

input/output redirection (<, >, >>), pipe (|)

examples: wc name > out, ls *.ps | wc, a2ps name | lpr

printing manual pages: man command name | rman -f ASCII | as2ps | lpr

processes

trees, parents, children, interrupts (Ctrl c, Ctrl d, Ctrl z) , foreground/background
  • ps -ef lists all processes' status
  • kill -9 PID sends to process with PID signal number 9 (unconditional interrupt)
  • Ctrl c cancels diaolgue process
  • Ctrl d ends dialogue entry
  • Ctrl z halts dialogue process
  • bg puts halted process to background
  • fg fetches background process to foreground