Skip to content
Snippets Groups Projects
Commit 578ffafb authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Weitere Beispiel-Dateien und Screenshots, 20.3.2023

parent 63b7dc91
Branches
No related tags found
No related merge requests found
Showing
with 211 additions and 0 deletions
cassini/home/peter/bo/2023ss/bs/20230320> which bc
/usr/bin/bc
cassini/home/peter/bo/2023ss/bs/20230320> bc
bc 1.07.1
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
2 + 2
4
quit
#!/usr/bin/bc
2 + 2
cassini/home/peter/bo/2023ss/bs/20230320> chmod +x bc.sh
cassini/home/peter/bo/2023ss/bs/20230320> ls -l bc.sh
-rwxr-xr-x 1 peter peter 21 Mär 20 18:04 bc.sh
cassini/home/peter/bo/2023ss/bs/20230320> ./bc.sh
bc 1.07.1
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
4
3 + 3
6
quit
#!/usr/bin/bc
2 + 2
quit
cassini/home/peter/bo/2023ss/bs/20230320> ./bc2.sh
bc 1.07.1
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
4
#!/usr/bin/bc
2 + 2
#!/usr/bin/bc
2 + 2
quit
cassini/home/peter/bo/2023ss/bs/20230320> grep Test test.txt
Dies ist ein Test.
cassini/home/peter/bo/2023ss/bs/20230320> echo $?
0
cassini/home/peter/bo/2023ss/bs/20230320> grep Täst test.txt
cassini/home/peter/bo/2023ss/bs/20230320> echo $?
1
cassini/home/peter/bo/2023ss/bs/20230320>
cassini/home/peter/bo/2023ss/bs/20230320> if grep Test test.txt; then echo "gefunden"; else echo "nicht gefunden"; fi
Dies ist ein Test.
gefunden
cassini/home/peter/bo/2023ss/bs/20230320> if grep Täst test.txt; then echo "gefunden"; else echo "nicht gefunden"; fi
nicht gefunden
cassini/home/peter/bo/2023ss/bs/20230320>
cassini/home/peter/bo/2023ss/bs/20230320> if grep -q Test test.txt; then echo "gefunden"; else echo "nicht gefunden"; fi
gefunden
cassini/home/peter/bo/2023ss/bs/20230320> if grep -q Täst test.txt; then echo "gefunden"; else echo "nicht gefunden"; fi
nicht gefunden
cassini/home/peter/bo/2023ss/bs/20230320>
cassini/home/peter/bo/2023ss/bs/20230320> for x in *.pdf; do xpdf $x; done
cassini/home/peter/bo/2023ss/bs/20230320> for x in *.pdf; do echo $x; xpdf $x; done
bs-20230320.pdf
logo-hochschule-bochum-cvh-text.pdf
logo-hochschule-bochum.pdf
Operating_system_placement-de.pdf
unix-20230320.pdf
cassini/home/peter/bo/2023ss/bs/20230320> for x in Anton Bertha Cäsar Dora; do echo "Hallo, $x!"; done
Hallo, Anton!
Hallo, Bertha!
Hallo, Cäsar!
Hallo, Dora!
cassini/home/peter/bo/2023ss/bs/20230320> for x in 1 2 3 4 5 6 7 8 9 10; do echo "$x * 7 = $(( x * 7 ))"; done
1 * 7 = 7
2 * 7 = 14
3 * 7 = 21
4 * 7 = 28
5 * 7 = 35
6 * 7 = 42
7 * 7 = 49
8 * 7 = 56
9 * 7 = 63
10 * 7 = 70
Das Unix-Programm "od" ist älter als die Bash, daher die Inkonsequenz:
https://de.wikipedia.org/wiki/Od_(Unix)#Geschichte
cassini/home/peter/bo/2023ss/bs/20230320> od test.txt
0000000 064504 071545 064440 072163 062440 067151 052040 071545
0000020 027164 000012
0000023
cassini/home/peter/bo/2023ss/bs/20230320> cat test.txt
Dies ist ein Test.
cassini/home/peter/bo/2023ss/bs/20230320> hexdump -C test.txt
00000000 44 69 65 73 20 69 73 74 20 65 69 6e 20 54 65 73 |Dies ist ein Tes|
00000010 74 2e 0a |t..|
00000013
cassini/home/peter/bo/2023ss/bs/20230320>
cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt
-rw-r--r-- 1 peter peter 19 Mär 20 16:41 test.txt
cassini/home/peter/bo/2023ss/bs/20230320> cat test.txt
Dies ist ein Test.
cassini/home/peter/bo/2023ss/bs/20230320> chmod -r test.txt
cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt
--w------- 1 peter peter 19 Mär 20 16:41 test.txt
cassini/home/peter/bo/2023ss/bs/20230320> cat test.txt
cat: test.txt: Keine Berechtigung
cassini/home/peter/bo/2023ss/bs/20230320> chmod -w test.txt
cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt
---------- 1 peter peter 19 Mär 20 16:41 test.txt
cassini/home/peter/bo/2023ss/bs/20230320> chmod +r test.txt
cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt
-r--r--r-- 1 peter peter 19 Mär 20 16:41 test.txt
cassini/home/peter/bo/2023ss/bs/20230320> chmod u+w test.txt
cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt
-rw-r--r-- 1 peter peter 19 Mär 20 16:41 test.txt
cassini/home/peter/bo/2023ss/bs/20230320>
cassini/home/peter/bo/2023ss/bs/20230320> chmod 000 test.txt
cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt
---------- 1 peter peter 19 Mär 20 16:41 test.txt
cassini/home/peter/bo/2023ss/bs/20230320> chmod 640 test.txt
cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt
-rw-r----- 1 peter peter 19 Mär 20 16:41 test.txt
cassini/home/peter/bo/2023ss/bs/20230320> chmod 755 test.txt
cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt
-rwxr-xr-x 1 peter peter 19 Mär 20 16:41 test.txt
cassini/home/peter/bo/2023ss/bs/20230320> chmod 644 test.txt
cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt
-rw-r--r-- 1 peter peter 19 Mär 20 16:41 test.txt
cassini/home/peter/bo/2023ss/bs/20230320>
cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt
-rwxr-xr-x 1 peter peter 19 Mär 20 16:41 test.txt
cassini/home/peter/bo/2023ss/bs/20230320> ./test.txt
./test.txt: Zeile 1: Dies: Kommando nicht gefunden.
cassini/home/peter/bo/2023ss/bs/20230320> cat test.sh
ls
echo "Hello, world!"
cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.sh
-rw-r--r-- 1 peter peter 24 Mär 20 17:53 test.sh
cassini/home/peter/bo/2023ss/bs/20230320> ./test.sh
bash: ./test.sh: Keine Berechtigung
cassini/home/peter/bo/2023ss/bs/20230320> chmod 755 test.sh
cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.sh
-rwxr-xr-x 1 peter peter 24 Mär 20 17:53 test.sh
cassini/home/peter/bo/2023ss/bs/20230320> ./test.sh
bs-20230320.aux grep-1.txt hello-02.c test4.txt
bs-20230320.log grep-2.txt logo-hochschule-bochum-cvh-text.pdf test5.txt
bs-20230320.nav grep-3.txt logo-hochschule-bochum.pdf test6.txt
bs-20230320.out grep-4.txt Operating_system_placement-de.pdf test.sh
bs-20230320.pdf grep-5.txt permissions-1.txt test.txt
bs-20230320.snm grep-6.txt permissions-2.txt tmp.inputs
bs-20230320.tex grep-7.txt permissions-3.txt unix-20230320.pdf
bs-20230320.toc hello-01 pgslides.sty unix-20230320.tex
bs-20230320.txt hello-01.c test2.txt vic
foo hello-02 test3.txt wildcards-1.txt
Hello, world!
cassini/home/peter/bo/2023ss/bs/20230320> cat test2.sh
echo -n "Ihr Befehl: "
read cmd
$cmd
cassini/home/peter/bo/2023ss/bs/20230320> chmod 755 test2.sh
cassini/home/peter/bo/2023ss/bs/20230320> ls -l test2.sh
-rwxr-xr-x 1 peter peter 37 Mär 20 17:55 test2.sh
cassini/home/peter/bo/2023ss/bs/20230320> ./test2.sh
Ihr Befehl: ls
bs-20230320.aux grep-5.txt pgslides.sty
bs-20230320.log grep-6.txt test2.sh
bs-20230320.nav grep-7.txt test2.txt
bs-20230320.out hello-01 test3.txt
bs-20230320.pdf hello-01.c test4.txt
bs-20230320.snm hello-02 test5.txt
bs-20230320.tex hello-02.c test6.txt
bs-20230320.toc logo-hochschule-bochum-cvh-text.pdf test.sh
bs-20230320.txt logo-hochschule-bochum.pdf test.txt
foo Operating_system_placement-de.pdf tmp.inputs
grep-1.txt permissions-1.txt unix-20230320.pdf
grep-2.txt permissions-2.txt unix-20230320.tex
grep-3.txt permissions-3.txt vic
grep-4.txt permissions-4.txt wildcards-1.txt
cassini/home/peter/bo/2023ss/bs/20230320> ls -l /usr/bin | grep -v "root *root"
insgesamt 1485232
-rwsr-sr-x 1 daemon daemon 55560 Jul 24 2018 at
-rwxr-sr-x 1 root tty 14736 Mai 4 2018 bsd-write
-rwxr-sr-x 1 root shadow 71816 Jul 27 2018 chage
-rwxr-sr-x 1 root crontab 43568 Okt 11 2019 crontab
-rwxr-sr-x 1 root mail 18944 Dez 3 2017 dotlockfile
-rwxr-xr-- 1 root wireshark 112888 Feb 8 19:46 dumpcap
-rwxr-sr-x 1 root utmp 14440 Jun 10 2021 Eterm
-rwxr-sr-x 1 root shadow 31000 Jul 27 2018 expiry
-rwxr-sr-x 1 root mail 18688 Jul 31 2022 lockfile
-rwxr-sr-x 1 root mlocate 39608 Nov 14 2018 mlocate
-rwxr-sr-x 1 root mail 14344 Apr 23 2022 mutt_dotlock
-rwsr-sr-x 1 root mail 97488 Jul 31 2022 procmail
-rwxr-sr-x 1 root ssh 321672 Jan 31 2020 ssh-agent
-rwxr-sr-x 1 root utmp 1411072 Mai 21 2021 urxvt
-rwxr-sr-x 1 root utmp 1415168 Mai 21 2021 urxvtd
-rwxr-sr-x 1 root tty 34896 Jan 10 2019 wall
https://gitlab.cvh-server.de/hardwarenahe-it/projekte
cassini/home/peter/bo/2023ss/bs/20230320> ls -l /usr/bin/sudo
-rwsr-xr-x 1 root root 157192 Jan 16 21:03 /usr/bin/sudo
cassini/home/peter/bo/2023ss/bs/20230320> ls -l /home/enigma/
insgesamt 8
drwxr-xr-x 2 enigma enigma 4096 Mai 26 2018 Desktop
drwx------ 2 enigma enigma 4096 Aug 22 2018 Downloads
cassini/home/peter/bo/2023ss/bs/20230320> ls -l /home/enigma/Downloads/
ls: Öffnen von Verzeichnis '/home/enigma/Downloads/' nicht möglich: Keine Berechtigung
cassini/home/peter/bo/2023ss/bs/20230320> sudo ls -l /home/enigma/Downloads/
[sudo] Passwort für peter:
insgesamt 5592
-rw-r--r-- 1 enigma enigma 2856917 Mai 30 2018 enigmail-2.0.6-sm+tb.xpi
-rw-r--r-- 1 enigma enigma 2866462 Aug 22 2018 enigmail-2.0.8-sm+tb.xpi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment