Übung 1, Seite 33: usr1 usr2 ... exit ALT-CTRL-DEL Übung 2, Seite 40: ALT-CTRL-F1 Seite 41: more /etc/passwd /etc/profile text/gedicht man man man -? --help whatis ls apropos ls Übung 3, Seite 53: id less /etc/passwd /etc/group who passwd id; groups newgrp uucp Seite 54: su gast su - gast exit Übung 4, Seite 71: cd cd / cd bin cd ../etc pwd ls -l cd; ls less /etc/passwd Seite 72: ls / ls /etc ... Übung 5, Seite 87: file * /usr/include/* /usr/bin/* /boot/* ls -l * /usr/include/* /usr/bin/* /boot/* file * | grep text du /home df Seite 88: file /bin/* | grep executable ls -l /bin cd; ls -a; more .profile cd /dev; ls -l cd /etc; ls -l ls -i Übung 6, Seite 93: touch f1 f2 f3 ln f1 f4 ln -s f1 f5 ls -li cp f1 f6 mv f6 f7 rm f* Übung 7, Seite 106: touch f1 f2 f3 f4 chmod a+w f* chmod go-w f* ls -l rm f* umask 007 touch f1 f2 f3 f4 rm f* umask 777 touch f1 f2 f3 f4 touch /etc/xxx /tmp/xxx ls -ld /etc /tmp Übung 8, Seite 121: ps ps -x ps -e top Seite 122: kill 4711 kill -9 4712 ps -el Übung 9, Seite 127: echo $SHELL more /etc/passwd ps sh; tcsh; ksh; bash; exit; exit; exit; exit Übung 10, Seite 136: var=inhalt echo $var sh exit set export var sh exit PS1="hallo: " Übung 11, Seite 140: var=$PATH echo $PATH PATH= PATH=$var PATH=$PATH:$HOME/bin type ls cd dir Übung 12, Seite 143: #!/bin/sh # Kommentar date +%D who pwd echo $TERM tty chmod a+rx xxx xxx Übung 13, Seite 149: history alias type xxx unalias xxx Seite 150: alias cx="chmod u+x" alias c=clear alias va="vi ~/.alias" alias sa="source ~/.alias" cx c va sa Übung 14, Seite 159: ls > erg ls / >> erg ls /etc >> erg cd /bin ls >> ~/erg echo Text > txt echo Text >> txt echo Text >> txt echo Text >> txt cat /etc/passwd schrott > erg 2> err Übung 15, Seite 163: more datei more < datei cat datei | more cat < datei | more ps -ef | grep $USER ps -e | grep sleep Übung 16, Seite 168: *a* *a a*a *aa* *[aeiou]* *aeiou* *a*e*i*o*u* *[!a-zA-Z0-9]* Seite 169: cd /usr/bin LANG=C *[A-Z]* ls -d oder echo ? ?? ??? ???? *{aa,ee,ii,oo,uu}* /*.c /*/*.c /*/*/*.c /*/*/*/*.c Seite 170: .* .[!.]* *{auto,conf}* *auto*conf* Übung 17, Seite 178: pwd pwd /home/jo /home/jo '"' $HOME $HOME $HOME \$HOME "'" Seite 179: echo "* $TERM > x &" * vt100 > x & echo '* $TERM > x &' * $TERM > x & echo \* \$TERM \> x \& * $TERM > x & Übung 18, Seite 187: #!/bin/sh # Texte ausgeben mit Ueberschrift # Aufruf: com f1 f2 f3 f4 ... | more for i do echo "********************* $i ********************" echo cat $i echo done exit 0 #!/bin/sh # Auswahlmenue while true do clear echo "Auswahlmenue" echo echo "Listing: (1)" echo "Prozesse: (2)" echo "exit (0)" echo echo "Bitte waehlen: \c" read input case $input in 1) ls -l ;; 2) ps ;; 0) break ;; *) echo "Falsche Wahl" ;; esac echo "Weiter mit RETURN \c" read dummy done echo "see you again" exit 0 #!/bin/sh # prueft Fileattribute # Aufruf: pruefe file if [ $1 ] then echo "Name existiert" if [ -f $1 ] then echo "$1 ist File" if [ -r $1 ] then echo "und ist lesbar" else echo "und ist nicht lesbar" fi if [ -w $1 ] then echo "und ist schreibbar" else echo "und ist nicht schreibbar" fi if [ -x $1 ] then echo "und ist ausfuehrbar" else echo "und ist nicht ausfuehrbar" fi elif [ -d $1 ] then echo "$1 ist Directory" if [ -r $1 ] then echo "und ist lesbar" else echo "und ist nicht lesbar" fi if [ -w $1 ] then echo "und ist schreibbar" else echo "und ist nicht schreibbar" fi if [ -x $1 ] then echo "und ist ausfuehrbar" else echo "und ist nicht ausfuehrbar" fi else echo "$1 ist vermutlich Geraet oder existiert nicht" exit 2 fi else echo "Kein Argument" exit 1 fi exit 0