Unix

awk
  • case $1 in
    • pattern { action }
      • no pattern matches every line
  • awk '{ print $0 }' < $tFile ;;
    • no action prints whole line
  • awk '/.*ie.*/' $tFile ;;
    • each match is processed; statements separated by ; or nl
  • awk 'BEGIN {print "begin"} /ie/ { print "ie:" $0 } $0 ~ /e/ {print "e :" $0} END {print "end"}' $tFile ;;
  • from to
  • awk '/fue/,/ehn/' $tFile ;;
  • boolean combinations: ! || && and parentheses
  • awk '/ie/ && ! /ech/' $tFile ;;
  • 6 rel ops as in C
  • awk
    'NR == 1 || NR > 3 { print "nr " NR ", nf " NF ", $0 " $0}' $tFile ;;
    *) echo 'argument <$1> not understood' ;;
    esac 
BCV: Business Continous Volume in emc: Disk Spiegelungen, Handhabung über sym* commands, Liste der Commands mit symcli -v. Business Continuance Volumes): Business Continuance Volumes are copies of active production volumes that can be used to run simultaneous tasks in parallel with one another
BNU = Basic Networking Utilities = bekanntester Release von UUCP
device z.B.
/dev/null: leeres / dummy File
/dev/zero: unendliches File von hex Nullen
df -l: disk info: device, space, mountpoint
mount <-> automount stört einander!
emc DiskSubsystem Hersteller plus Software für Verwaltung der Spiegelung usw..
filesystem fs
fflush flush't die Buffer eines streams etc, aber nicht die OS Buffers!
fsync: synchronises the stream, file etc. data down to the filesystem, is there even if crashes occur. However, metadata is only flushed, not synced, for this an additional fsync on the directory-file must be done. in php use e.g. eio_fsync
GNU GNU is Not Unix: freies Softwareprojekt für eine kompletes Unix, aber GNU Kernel ist noch nicht reif genug
GNOME GNOME ist ein GNU Desktop und Entwicklungsumgebung
GTK GTK+ is a highly usable, feature rich toolkit for creating graphical user interfaces which boasts cross platform compatibility and an easy to use API. Gehört zu GNU, Ursprünglich für GIMP entwickelt (Gimp Toolkit), wird von GNOME und viele anderen gebraucht. Enthält 4 Libraries:
  • GLib a low-level core library
  • Pango a library for layout and rendering of text with an emphasis on internationalization
  • Cairo a library for 2D graphics with support for multiple output devices (including the X Window System, Win32)
  • ATK a library for a set of interfaces providing accessibility.
job = processGroup im Background oder suspended. Commands: jobs, fg, bg, stop, wait
jobNummer ist eine kleine Zahlen (pro Terminal): % oder %+ für aktuellen Job, %- für vorherigen, ?find
KDE eine Entwickler Community von free open Software vom KDE (Plasma) Desktop, Kword KSpread, Konqueror web browser, etc.
less pager, mächtiger als more
  • q quit
  • arrows, pageUp/Down
  • g oder > : go ZeilenNummer vorher eingeben
  • % : go Prozentsatz
  • { [ ( wenn eine solche Klammer auf TopLine erscheint, positioniere entsprechende closing bracket auf bottom line
  • } ] ) wenn eine solche Klammer auf Bottom Line erscheint, positionier entsprechende open bracket auf top line
  • m lowerCaseCharacter : markiere aktuelle Position mit lowerCaseCharacter
  • ' lowerCaseCharacter : gehe zu mit lowerCaseCharacter markierer Position
  • / search (n times default n=1) vorwärts (regular expression mit Optionen am Anfang
  • n repeat search
  • N repeat search in opposite direction
Linux
man: manual pages anzeigen
  • im Wiki über farmmap Eintrag Man:man.1 oder Man:man (ohne section) geht auf http://manpages.ubuntu.com/manpages/bionic/en/, bionic ist der Release 18
  • man section? page: zeigt diese section dieser page an
  • man -a page : zeigt alle sections dieser page an
  • man bentzt einen pager heute meist less (nicht mehr more)
  • man -f alias whatis: short description dieser man page
  • man -k : alias apropos : alle short descriptions durchsuchen und matches anzeigen
mkfs.exfat -nElement0805 /dev/sdg1 auf exfat formatieren
NFS = Networked File System: FileSystem via Network anhängen
NIS = Network Information Service, introduced by Sun (handling von remote users, groups usw.)
proc die Prozesse kann man aus proc-Filesystem (normalerweise auf /proc gemount'd) auslesen und auch ändern: Man:proc.5
processGroup = Prozesse, die für einen Command erzeugt werden
regExp = regular expressions: allgemeiner aber anders für (teils) grep und teils egrep usw.: . (punkt) einzel Char. $ endOfLine, ^beginOfLine, * 0-n mal Vorherige Expr, \ escape (aber ohne quotes verschluck shell ersten \), [...] charset mit - und ^ für Negation, {min, max} Wiederholungen und \(, \), \n für backReferenzen
runlevel: 0=halt, 1=singleUser,3=full multiuser, 6=reboot. ändern mit init x. Dann werden zuerst kill script aus /etc/rc.d/rcX.d/k * (für alten run level X) und dann Start Script (.../s* aus neuem run level) gestartet
rsync flexible copy/synchronisation utility. transfers deltas, may remove file/folders in destination, or copy backups or changed files somewhere else... Works locally or remote (with demon / or rsh. Test: Inf:/unix/rsyncT Man:rsync
  • + kann auch im Source gelöschte File im Ziel löschen
  • bleibt hängen nach ein paar Minuten
    • sudo sysctl vm.swappiness=0 half beim zweiten Versuch viel, beim ersten nicht. Komisch ist, dass man im Monitor kein Swap sieht, muss gut versteckt zwischen Disk/USB und Linux sein
    • nächste Analyse Steps mit --log-file
scheduling via Priorität und Nice Value
setuid und setgid Bits: Executables laufen unter uid/gid des Files, für Directories: File dring bekommen entsprec owner/group
signal
  • General Process Control Signals, von weich nach hart
    • TERM Termination—process may ignore or block this (default von kill)
    • HUP Detection of terminal hangup or controlling process death
    • INT Interactive attention signal—INTR control character generates this
    • QUIT Interactive termination—QUIT control character generates this
    • KILL Termination—process cannot ignore or block this
  • Job Control Process Control Signals
    • CONT Continue a stopped process—process cannot ignore or block this
    • STOP Stop a process—process cannot ignore or block this
    • TSTP Interactive stop—SUSP control character generates this
    • TTIN Background job attempted a read—process group is suspended
    • TTOU Background job attempted a write—process group is suspended
SRDF: Symmetrix Remote Data Facility
stickyBig = sticky bit: nur owner darf (öffentlich schreibbares) File löschen
Symmetrix: Intelligente DiskBoxen vom emc
TimeFinder Utility um BCV zu verwalten
Ubuntu per default mit GNOME Desktop
UUCP = historische Verbind zwischen Unix Maschinen
VeritasVolumeManager volume manager für emc
vi Editor braucht envVar TERM für TerminalType. vi hat verschiedene Modes: CommandMode, InputMode, User : Mode.
  • Mit Esc (oder CommandEnde) zurück nach CommandMode
  • InputMode: zurück mit Esc oder Interrupt
  • CommandMode
  • Cursor Bewegungen mit Pfeil oder h links, j down, k up, l rechts, 0 anfangsZeile, $ endeZeile
    • w; ein wort vorwärts, e EndOfWord b wort backward
    • ctlr d halbeSeite down, ctrl F eine Seite vorwärts, ctrl U halbeSeite Up, ctrl b halbeSeite back
    • G goToLine (Last, Zahl vorher), ctrl G show LineNum
    • i: character insert, a character append, o insert line after O insert line before
    • cw Wort ersetzte~, r ersetzte ein Zeichen, R ersetze Text, ~ gross/klein
    • n, x delete char, dw deleteWord, dd deleteLine
    • / search forwad, ? search backward, n search again, N search reverse
    • ( begin of sentenc, ) end of sentence, ]] next [[ previous section/function, } next { previous paragraph
    • u undo
    • .: redo last change
    • ZZ write and quit
    • J Join Line
    • zahl: ZeilenNummer / RepeatCount folgender Command
    • d delete y yank(copy) usw. mit skip Modifikation
    • p paste after cursor, P paste before
    • "x: buffer x addressieren für folgenden befehl (y p usw).
  • Command mit : zurück mit enter
    • :e fileName: edit file
    • :e! reEdit, discard changes
    • :sh shell
    • :! ein shelll command
    • !! ein shelll command output nach editFile