Helmuth Peer
<!-- Launch LXTerminal with Ctrl+Alt+t--> <keybind key="C-A-t"> <action name="Execute"> <command>lxterminal</command> </action> </keybind> zu ~/.config/openbox/lxde-rc.xml hinzuzfügen
Terminal öffnen > Bearbeiten > Einstellungen > Darstellung > Standard-Fenstergröße: 250 x 60
==== Fenster maximieren mit Strg + Alt + 0 (Null) ==== geht nicht!!
==== Ctrl+Alt+End: Shut down ==== geht nicht!!
sudo apt install p7zip-full
Erstellen/Hinzufügen:
7z a mein_archiv.7z *.txt fügt alle .txt-Dateien hinzu.
Extrahieren:
7z x Archivname.7z (extrahiert mit Pfaden) oder 7z e <Archivname>.7z (ohne Pfade).
Auflisten:
7z l Archivname.7z zeigt den Inhalt des Archivs.
Testen:
7z t Archivname.7z prüft die Integrität des Archivs.
sudo apt install x11-xserver-utils
xrandr --output VGA-1 --mode 1920x1080 --pos 1920x0 --rotate normal --output DP-1 --off --output HDMI-2 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-1 --off --output DP-2 --off
awk ist eine Skriptsprache zum Editieren und Analysieren von Texten
awk 'NR==3||NR==5||NR==13' zeilen.txt
awk '{printf "%s %s,%d\n",$1,$2,length($1)+length($2)}' vor_und_zunamen.txt
sudo nmap -sS 10.0.0.* -p80 --open | awk '/report|MAC/'
#!/bin/bash for i in * do NEWNAME=`echo "$i" | awk '{print tolower($0)}'` mv "$i" "$NEWNAME" done
ls -la | awk -F" " '{ print $9 }'
awk '{tmp=$1; $1=$2;$2=tmp; print}' vor_und_zunamen.txt
sudo apt install bc
bc <<< "scale=2; 2.54*4/3+4-3"
bc <<< "scale=2; 2^4"
n√x = x^(1/n) = e(ln x)/n
bc -l <<< "scale=2;e(l(8)/3)"
Mit bc -l wird eine mathematische Bibliothek hinzugefügt
s(x), sine of x, x is in radians
c(x), cosine of x, x is in radians
a(x), arctangent of x, arctangent returns radians
l(x), natural logarithm of x
e(x), exponential function of raising e to the value x
bc -l <<< "scale=100; a(1)*4"
Ggf. zu /etc/apt/sources.list hinzufügen:
deb http://deb.debian.org/debian testing main contrib non-free
sudo apt update
sudo apt install btop
sudo apt install ncal
cal 2026
ncal 2026
cal 2026 > 2026.txt
cal 3 2026
Im Jahr 1752 übernahmen Großbritannien und seine amerikanischen Kolonien den gregorianischen Kalender.
Es wurden elf Tage übersprungen, sodass dem 2. September 1752 direkt der 14. September folgte.
cal 9 1752
cal -y 2026
Das ganze Jahr mit Tagnummer
cal -j 2026
Woche beginnt mit Montag
ncal -M 2026
cat /dev/hdd > name.iso
cat name.iso > /dev/hdd
cat /dev/video0 > film.mpg
cat /dev/audio > mpg123.wav ?? RAW Datei?
cat /dev/zero > /dev/hda löscht Festplatte
cat /proc/partitions ← listet alle Partitionen auf
sudo apt install imagemagick
mkdir internet;for i in *.[jJ][pP][gG] ; do convert $i -verbose -resize 1280x internet/$i ; done
convert input.jpg output.png.
convert input.png -rotate 90 output.png
cp test.txt{,.bak}
sudo cp Downloads/ubuntu-12.04.3-desktop-amd64.iso /dev/sdb
peer@bdf2024:~$ sudo gparted The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes. This is usually caused by accidently using the wrong block size when copying an iso to the drive. This is an annoying problem, but it's rather easy to fix.
Lösung:
sudo dd if=/dev/zero of=/dev/<id_of_your_device> bs=2048; sync
dd if=datei.img of=/dev/sdd bs=1M status=progress oflag=sync,direct
dd if=/dev/sdc of=/dev/sdd bs=1M status=progress oflag=sync,direct
dd if=/dev/random of=/dev/sde bs=1M
for i in {f..o}; do dd if=/dev/sde of=/dev/sd$i bs=1M status=progress & done
sudo apt install imagemagick
display name.jpg
display -resize 1024x name.jpg
display -resize x768 name.jpg
display -resize 60% name.jpg
display -rotate -90 name.jpg
sudo apt install eog
eog name.jpg
eog --slide-show /path/to/folder
gsettings set org.gnome.eog.fullscreen seconds 2
sudo apt install f3
f3write /media/user/Laufwerks-UUID
f3read /media/user/Laufwerks-UUID
sudo apt install ffmpeg
ffmpeg -i in.mp4 out.mp3
ffmpeg -i video.mp4 -vn -ar 44100 -ac 2 -ab 192k -f mp3 audio.mp3
ffmpeg -i audio.wav -acodec libmp3lame audio.mp3
#! /bin/bash part="1" read -p 'sdX: ' device sudo shred -fvn 1 /dev/$device sync sudo fdisk /dev/$device<<EOF n p 1 t 7 w EOF sync umount /dev/$device$part #Formatieren Patition 1 sudo mkfs.ntfs /dev/$device$part sync #umount /dev/$device$part sudo mkfs.ntfs /dev/sde1
#! /bin/bash part="1" read -p 'sdX: ' device sudo shred -fvn 1 /dev/$device sync sudo fdisk /dev/$device<<EOF n p 1 t 7 w EOF sync #Formatieren Patition 1 sudo mkfs.ntfs /dev/$device$part sync #sudo smartctl -t short /dev/sde #sync sudo badblocks -v /dev/$device$part
sudo fdisk /dev/sde < fdisk.conf
d 1 d 2 d 3 d 4 n p 1 +2000M n p 2 t 1 7 a 1 w
d (delete partitions) n (to create new partiton) p (for primary partition) 1 (for partition number) default for first cylinder default for last cylinder t (change partition's system id) 1 (for partition number) 7 (for NTFS partition) w (to write changes)
sudo apt install feh
feh dateiname.jpg
feh -F dateiname.jpg <- Vollbild
feh -g 640x480 dateiname.jpg
feh -c * <- Collage
#ChatGPT #!/bin/bash # Verzeichnis, in dem die Dateien gesucht werden VERZEICHNIS="/Pfad/zum/Verzeichnis" # Dauer zwischen den Übergängen (in Sekunden) DELAY=5 # Endlosschleife while true; do # Bilder anzeigen for bild in "$VERZEICHNIS"/*.{jpg,jpeg,png,gif}; do if [ -f "$bild" ]; then eog "$bild" & # 'eog' ist der Eye of GNOME Bildbetrachter sleep "$DELAY" killall eog # Schließe den Bildbetrachter fi done # Filme abspielen for film in "$VERZEICHNIS"/*.{mp4,mkv,avi,wmv}; do if [ -f "$film" ]; then mpv "$film" # 'mpv' ist ein Mediaplayer, der Filme abspielen kann fi done done ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #Deepseek #!/bin/bash # Endlosschleife für Bilder und Videos while true; do # Durchsuche das aktuelle Verzeichnis nach Bild- und Videodateien for file in *; do # Überspringe Verzeichnisse if [ -d "$file" ]; then continue fi # Prüfe Dateityp anhand der Erweiterung case "${file,,}" in *.jpg|*.jpeg|*.png|*.gif|*.bmp|*.tiff) echo "Zeige Bild: $file" # Verwende feh für Bilder (installieren mit: sudo apt install feh) feh --fullscreen --auto-zoom --hide-pointer "$file" & FEH_PID=$! sleep 5 kill $FEH_PID 2>/dev/null ;; *.mp4|*.avi|*.mkv|*.mov|*.wmv|*.flv|*.webm|*.m4v) echo "Spiele Video ab: $file" # Verwende mpv für Videos (installieren mit: sudo apt install mpv) mpv --fs --no-audio --loop-file=no "$file" ;; *) # Überspringe andere Dateitypen continue ;; esac done done
sudo apt install findutils
sudo find /verzeichnis -type f -iname *name.jpg
sudo find /verzeichnis -type d -iname *verzeichnisname
Weitere Beispiele …
fsck.vfat -r /dev/sdXn fsck.vfat -n /dev/sdc1 - a simple non-interactive read-only check fsck.vfat -a /dev/sdc1 - checks the file system and fixes non-interactively. Least destructive approach is always used. fsck.vfat -r /dev/sdc1 - interactive repair. User is always prompted when there is more than a single approach to fixing a problem. fsck.vfat -l -v -a -t /dev/sdc1 - a very verbose way of checking and repairing the filesystem non-interactively. The -t parameter will mark unreadable clusters as bad, thus making them unavailable to newly created files and directories.
hostnamectl
#! /bin/bash #Ö3 cvlc https://orf-live.ors-shoutcast.at/oe3-q2a.m3u
#! /bin/bash #Radio T cvlc http://streaming.fueralle.org:8000/radiot.ogg
#! /bin/bash #ANTENNE BAYERN Oldies but Goldies cvlc https://play.antenne.de/oldies-but-goldies.m3u
#! /bin/bash killall vlc
ip a
ip addr show
curl ifconfig.me
sudo apt install iperf3
sudo iperf3 -s
sudo iperf3 -c IP_DES_SERVERS
sudo apt install jhead
jhead -n%Y-%m-%d_%H-%M-%S *.[jJ][pP][gG]
jhead dateiname.jpg gibt die EXIF-Dateiinformationen von Digitalfotos aus
for i in *; do jhead -exonly -ft $i;done
jhead dateiname.jpg
for i in *; do jhead -exonly -ft $i;done
jhead -ta-9 dateiname.jpg <- Zeit 9 Stunden zurücksetzen (-ta<+|-><timediff>) jhead -ta+0:00:25 *.jpg <- 25 Sekunden vor jhead -ts2008:07:25-15:00:00 VancouverKamloops.jpg
jhead -da<newdate>-<olddate> dateiname.jpg, jhead -da2005:03:01-2004:03:01 dateiname.jpg jhead -da2005:03:01-2004:03:01 *.jpg
jhead -de dateinmae.jpg
jhead -mkexif dateiname.jpg
jhead -n%Y-%m-%d_%H:%M:%S *.[jJ][pP][gG] ; n=1;for i in *;do mv $i bild_$(printf "%03d" $n).jpg;n=`expr $n + 1`;done
sudo apt install libjpeg-progs
jpegtran -flip horizontal path/to/image.jpg > path/to/output.jpg
jpegtran -rotate 90 path/to/image.jpg > path/to/output.jpg
jpegtran -grayscale path/to/image.jpg > path/to/output.jpg
jpegtran -crop 100x100+10+10 path/to/image.jpg > path/to/output.jpg
kill -9 `ps -u <username> -o "pid="`
ps aux | grep thunderbird | awk '{print "kill -9 "$2}' | sh
libreoffice25.8 --writer /pfad/dateiname.odt
libreoffice25.8 --calc /pfad/dateiname.ods
libreoffice25.8 --impress /pfad/dateiname.odp
libreoffice25.8 --draw /pfad/dateiname.odg
libreoffice25.8 --math /pfad/dateiname.odt
libreoffice25.8 --base /pfad/dateiname.odb
sudo apt install speedtest-cli
touch speed.txt
sudo speedtest-cli --secure | awk -v date=$(date '+%d.%b.%Y,%H:%M') 'NR==7 || NR==9 {printf "%s\t",$2} END {printf "%s\n",date}' >> speed.txt ; cat speed.txt