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

Screenshots und Beispiele 30.10.2024

parent 14c7aa3c
No related branches found
No related tags found
No related merge requests found
cat: gibtsnicht.txt: Datei oder Verzeichnis nicht gefunden
cassini/home/peter/bo/2024ws/dbs> find . -name "dbs-2024*.tex"
./20241002/dbs-2024ws-p0.tex
./20241002/dbs-20241002.tex
./20241030/dbs-2024ws-p1.tex
./20241030/dbs-20241030.tex
./20241016/dbs-20241016.tex
./20241009/dbs-20241009.tex
cassini/home/peter/bo/2024ws/dbs> grep "Sägefisch" $(find . -name "dbs-2024*.tex")
./20241030/dbs-20241030.tex: $ ¡grep -l "Sägefisch" $(find . -name "dbs-2024*.tex")¿
cassini/home/peter/bo/2024ws/dbs> find . -name "dbs-2024*.tex" | xargs grep "Sägefisch"
./20241030/dbs-20241030.tex: $ ¡grep -l "Sägefisch" $(find . -name "dbs-2024*.tex")¿
cassini/home/peter/bo/2024ws/dbs> find . -name "dbs-2024*.tex" -exec grep "Sägefisch" {} +
./20241030/dbs-20241030.tex: $ ¡grep -l "Sägefisch" $(find . -name "dbs-2024*.tex")¿
cassini/home/peter/bo/2024ws/dbs> find . -name "dbs-2024*.tex" -exec grep "Sägefisch" {} \;
$ ¡grep -l "Sägefisch" $(find . -name "dbs-2024*.tex")¿
cassini/home/peter/bo/2024ws/dbs>
cassini/home/peter/bo/2024ws/dbs> grep "Sägefisch" $(find . -name "dbs-2024*.tex")
./20241030/dbs-20241030.tex: $ ¡grep -l "Sägefisch" $(find . -name "dbs-2024*.tex")¿
cassini/home/peter/bo/2024ws/dbs> grep -l "Sägefisch" $(find . -name "dbs-2024*.tex")
./20241030/dbs-20241030.tex
cassini/home/peter/bo/2024ws/dbs> vi $(grep -l "Sägefisch" $(find . -name "dbs-2024*.tex"))
cassini/home/peter/bo/2024ws/dbs/20241030> if grep Blubb *.tex; then echo "gefunden"; else echo "nicht gefunden"; fi
dbs-20241030.tex: $ ¡if grep Blubb test.txt; then echo "gefunden"; \
gefunden
cassini/home/peter/bo/2024ws/dbs/20241030> if grep "Sägefisch" *.tex; then echo "gefunden"; else echo "nicht gefunden"; fi
dbs-20241030.tex: $ ¡grep -l "Sägefisch" $(find . -name "dbs-2024*.tex")¿
gefunden
cassini/home/peter/bo/2024ws/dbs/20241030> if grep -q "Sägefisch" *.tex; then echo "gefunden"; else echo "nicht gefunden"; fi
gefunden
cassini/home/peter/bo/2024ws/dbs/20241030> if grep "Sägefisch" *.tex > /dev/null; then echo "gefunden"; else echo "nicht gefunden"; fi
gefunden
cassini/home/peter/bo/2024ws/dbs/20241030> if grep "Hammerhai" *.tex > /dev/null; then echo "gefunden"; else echo "nicht gefunden"; fi
nicht gefunden
cassini/home/peter/bo/2024ws/dbs/20241030>
cassini/home/peter/bo/2024ws/dbs/20241030> cat gibtsnicht.txt
cat: gibtsnicht.txt: Datei oder Verzeichnis nicht gefunden
cassini/home/peter/bo/2024ws/dbs/20241030> cat gibtsnicht.txt > fehler.txt
cat: gibtsnicht.txt: Datei oder Verzeichnis nicht gefunden
cassini/home/peter/bo/2024ws/dbs/20241030> cat fehler.txt
cassini/home/peter/bo/2024ws/dbs/20241030> cat gibtsnicht.txt 2> fehler.txt
cassini/home/peter/bo/2024ws/dbs/20241030> cat fehler.txt
cat: gibtsnicht.txt: Datei oder Verzeichnis nicht gefunden
cassini/home/peter/bo/2024ws/dbs/20241030> cat gibtsnicht.txt > fehler.txt 2>&1
cassini/home/peter/bo/2024ws/dbs/20241030> cat fehler.txt
cat: gibtsnicht.txt: Datei oder Verzeichnis nicht gefunden
cassini/home/peter/bo/2024ws/dbs/20241030>
cassini/home/peter/bo/2024ws/dbs/20241030> echo "2 + 2" | bc
4
cassini/home/peter/bo/2024ws/dbs/20241030> echo "2 + 2" | gzip
gzip: compressed data not written to a terminal. Use -f to force compression.
For help, type: gzip -h
cassini/home/peter/bo/2024ws/dbs/20241030> echo "2 + 2" | gzip -f
3R�V0���j{cassini/home/peter/bo/2024ws/dbs/20241030> echo "2 + 2" | gzip | gunzip
2 + 2
cassini/home/peter/bo/2024ws/dbs/20241030> echo "2 + 2" | gzip | gunzip | bc
4
cassini/home/peter/bo/2024ws/dbs/20241030>
cassini/home/peter/bo/2024ws/dbs/20241030> echo "2 + 2" | gzip | cat | gunzip | bc
4
cassini/home/peter/bo/2024ws/dbs/20241030> echo "2 + 2" | gzip | cat | gunzip | cat | bc
4
cassini/home/peter/bo/2024ws/dbs/20241030> cat /proc/sys/fs/file-max
9223372036854775807
cassini/home/peter/bo/2024ws/dbs/20241030> echo "obase=16" | bc
cassini/home/peter/bo/2024ws/dbs/20241030> (echo "obase=16"; cat /proc/sys/fs/file-max) | bc 7FFFFFFFFFFFFFFF
cassini/home/peter/bo/2024ws/dbs/20241030>
c=1
chmod -x *.JPG
for x in DSC_[0-9][0-9][0-9][0-9].JPG; do
y=$(printf "%04d" $c).jpg
mv $x $y
c=$((c + 1))
done
cassini/home/peter/bo/2024ws/dbs/20241030> echo "Dies ist ein Test." > test.txt
cassini/home/peter/bo/2024ws/dbs/20241030> sed -i test.txt -e 's/Test/Toast/'
cassini/home/peter/bo/2024ws/dbs/20241030> cat test.txt
Dies ist ein Toast.
cassini/home/peter/bo/2024ws/dbs/20241030>
cassini/home/peter/bo/2024ws/dbs/20241030> seq
seq: fehlender Operand
„seq --help“ liefert weitere Informationen.
cassini/home/peter/bo/2024ws/dbs/20241030> seq 10
1
2
3
4
5
6
7
8
9
10
cassini/home/peter/bo/2024ws/dbs/20241030> seq 10 0
cassini/home/peter/bo/2024ws/dbs/20241030> seq 10 -1 0
10
9
8
7
6
5
4
3
2
1
0
cassini/home/peter/bo/2024ws/dbs/20241030> for x in $(seq 10); do echo "Hallo! :-)"; done
Hallo! :-)
Hallo! :-)
Hallo! :-)
Hallo! :-)
Hallo! :-)
Hallo! :-)
Hallo! :-)
Hallo! :-)
Hallo! :-)
Hallo! :-)
cassini/home/peter/bo/2024ws/dbs/20241030> for x in $(seq 10); do echo "Hallo! :-) $x"; done
Hallo! :-) 1
Hallo! :-) 2
Hallo! :-) 3
Hallo! :-) 4
Hallo! :-) 5
Hallo! :-) 6
Hallo! :-) 7
Hallo! :-) 8
Hallo! :-) 9
Hallo! :-) 10
cassini/home/peter/bo/2024ws/dbs/20241030>
cassini/root# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Lokale Schleife)
RX packets 2297761 bytes 6115607912 (5.6 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2297761 bytes 6115607912 (5.6 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.128.29.182 netmask 255.255.255.0 broadcast 10.128.29.255
inet6 fe80::c685:8ff:fe4a:5042 prefixlen 64 scopeid 0x20<link>
ether c4:85:08:4a:50:42 txqueuelen 1000 (Ethernet)
RX packets 359517 bytes 120220340 (114.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 629790 bytes 335544446 (320.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
cassini/root# ip neighbour
10.128.29.1 dev wlan0 lladdr 00:1b:17:00:01:18 REACHABLE
cassini/root# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether c4:85:08:4a:50:42 brd ff:ff:ff:ff:ff:ff
altname wlp2s0
inet 10.128.29.182/24 brd 10.128.29.255 scope global dynamic wlan0
valid_lft 600875sec preferred_lft 600875sec
inet6 fe80::c685:8ff:fe4a:5042/64 scope link
valid_lft forever preferred_lft forever
cassini/root# ping 10.128.29.1
PING 10.128.29.1 (10.128.29.1) 56(84) bytes of data.
64 bytes from 10.128.29.1: icmp_seq=1 ttl=64 time=1.82 ms
64 bytes from 10.128.29.1: icmp_seq=2 ttl=64 time=2.05 ms
64 bytes from 10.128.29.1: icmp_seq=3 ttl=64 time=1.73 ms
^C
--- 10.128.29.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 1.729/1.866/2.049/0.134 ms
cassini/root#
cassini/home/peter/bo/2024ws/dbs/20241030> ping 88.198.170.60
PING 88.198.170.60 (88.198.170.60) 56(84) bytes of data.
64 bytes from 88.198.170.60: icmp_seq=1 ttl=55 time=12.9 ms
64 bytes from 88.198.170.60: icmp_seq=2 ttl=55 time=12.7 ms
64 bytes from 88.198.170.60: icmp_seq=3 ttl=55 time=12.7 ms
^C
--- 88.198.170.60 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 12.689/12.772/12.936/0.115 ms
cassini/home/peter/bo/2024ws/dbs/20241030> nc 88.198.170.60 80
Hallo?
HTTP/1.1 400 Bad Request
Date: Wed, 30 Oct 2024 11:38:18 GMT
Server: Apache/2.4.62 (Debian)
Content-Length: 308
Connection: close
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<hr>
<address>Apache/2.4.62 (Debian) Server at m31.gerwinski.de Port 80</address>
</body></html>
cassini/home/peter/bo/2024ws/dbs/20241030>
cassini/home/peter/bo/2024ws/dbs/20241030> nc 88.198.170.60 81
(UNKNOWN) [88.198.170.60] 81 (?) : Connection refused
cassini/home/peter/bo/2024ws/dbs/20241030>
cassini/home/peter> nc -p 1234 -l
Hallo?
Selber Hallo!
???
!!!
^C
cassini/home/peter>
cassini/home/peter/bo/2024ws/dbs/20241030> nc 88.198.170.60 81
(UNKNOWN) [88.198.170.60] 81 (?) : Connection refused
cassini/home/peter/bo/2024ws/dbs/20241030> cat >> tcp-ip-03.txt
cassini/home/peter/bo/2024ws/dbs/20241030> nc 88.198.170.60 81
(UNKNOWN) [88.198.170.60] 81 (?) : Connection refused
cassini/home/peter/bo/2024ws/dbs/20241030>
cassini/home/peter/bo/2024ws/dbs/20241030> nc 127.0.0.1 1234
Hallo?
Selber Hallo!
???
!!!
cassini/home/peter/bo/2024ws/dbs/20241030>
cassini/home/peter/bo/2024ws/dbs/20241030> nc 88.198.170.60 80
GET /^M
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>ngc224.gerwinski.de</title>
</head>
<body background="ngc224.jpg" bgcolor="#000000" text="#CFCFCF"
link="#7F7FFF" alink="#CFCFFF" vlink="#FF5FFF">
<h1>ngc224.gerwinski.de - der Server</h1>
<p>Benannt nach der Andromeda-Galaxie - M31 - NGC224
<p align="center"><img src="null.png" alt="" width="1" height="1" vspace="360">
<p><font size="-2"><a href="http://www.peter.gerwinski.de">Peter Gerwinski</a><br>
<a href="http://www.noao.edu/image_gallery/html/im0424.html">Bild:
Bill Schoening, Vanessa Harvey/REU program/NOAO/AURA/NSF</a></font>
</body>
</html>
cassini/home/peter/bo/2024ws/dbs/20241030>
cassini/home/peter/bo/2024ws/dbs/20241030> nc localhost 1234
2 + 2
4
2 ^ 64
18446744073709551616
obase=16
65535
FFFF
quit
cassini/home/peter/bo/2024ws/dbs/20241030>
cassini/home/peter> nc -p 1234 -l -c bc
cassini/home/peter>
Dies ist ein Toast.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment