2020-09-17 20:42:16 +02:00
|
|
|
# Commands
|
|
|
|
|
|
|
|
## Normalize audio
|
|
|
|
```bash
|
2020-05-16 11:47:13 +02:00
|
|
|
ffmpeg-normalize *.<format> -v -pr -c:a <audio codec> -ext <extension>
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-16 11:47:13 +02:00
|
|
|
Examples:
|
2020-09-17 20:42:16 +02:00
|
|
|
```bash
|
2020-05-16 11:47:13 +02:00
|
|
|
ffmpeg-normalize *.flac -v -pr -c:a flac -ext flac
|
|
|
|
ffmpeg-normalize *.m4a -v -pr -c:a libopus -ext opus
|
|
|
|
ffmpeg-normalize *.opus -v -pr -c:a libopus -ext opus
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-16 11:47:13 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## extract images from video
|
|
|
|
```bash
|
2020-05-16 11:47:13 +02:00
|
|
|
ffmpeg -i "file.mpg" -r 1/1 xyz%03d.png
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-16 11:47:13 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## copy lightdm configured themes
|
|
|
|
```bash
|
2020-05-16 11:47:13 +02:00
|
|
|
sudo cp -r /var/lib/lightdm/.local/share/webkitgtk/localstorage/ ~/ && sudo chmod -Rv 777 ~/localstorage/
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-16 11:47:13 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## Single 4KiB random write process
|
|
|
|
```bash
|
2020-05-16 11:47:13 +02:00
|
|
|
fio --output=fio-4K-randw.txt --name=random-write --ioengine=posixaio --rw=randwrite --bs=4k --size=4g --numjobs=1 --iodepth=1 --runtime=120 --time_based --end_fsync=1
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-16 11:47:13 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## 16 parallel 64KiB random write processes
|
|
|
|
```bash
|
2020-05-16 11:47:13 +02:00
|
|
|
fio --output=fio-64K-randw-x16.txt --name=random-write --ioengine=posixaio --rw=randwrite --bs=64k --size=256m --numjobs=16 --iodepth=16 --runtime=120 --time_based --end_fsync=1
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-16 11:47:13 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## Single 1MiB random write process (16gb file)
|
|
|
|
```bash
|
2020-05-16 11:47:13 +02:00
|
|
|
fio --output=fio-1M-randw.txt --name=random-write --ioengine=posixaio --rw=randwrite --bs=1m --size=16g --numjobs=1 --iodepth=1 --runtime=120 --time_based --end_fsync=1
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-16 11:47:13 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## Single 1MiB random write process (32gb file, 5 min)
|
|
|
|
```bash
|
2020-05-30 17:49:14 +02:00
|
|
|
fio --output=fio-1M-randw-32gb.txt --name=random-write --ioengine=posixaio --rw=randwrite --bs=1m --size=32g --numjobs=1 --iodepth=1 --runtime=300 --time_based --end_fsync=1
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-30 17:49:14 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## Single 1MiB random write process (64gb file, 10 min)
|
|
|
|
```bash
|
2020-05-30 17:49:14 +02:00
|
|
|
fio --output=fio-1M-randw-64gb.txt --name=random-write --ioengine=posixaio --rw=randwrite --bs=1m --size=64g --numjobs=1 --iodepth=1 --runtime=600 --time_based --end_fsync=1
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-30 17:49:14 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## smartctl test
|
|
|
|
```bash
|
2020-05-16 11:47:13 +02:00
|
|
|
sudo smartctl -t <short|long> <disk>
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-16 11:47:13 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## smartctl status
|
|
|
|
```bash
|
2020-05-16 11:47:13 +02:00
|
|
|
sudo smartctl -a <disk>
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-16 11:47:13 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## fake identity
|
|
|
|
```bash
|
2020-05-16 11:47:13 +02:00
|
|
|
rig
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-16 11:47:13 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## Mangohud
|
|
|
|
In Steam: ``` mangohud %command% MANGOHUD_OUTPUT /home/marc/Dokumente/log ```
|
|
|
|
Lutris: command prefix: ``` mangohud, Environment Variables: MANGOHUD_OUTPUT | /home/marc/Dokumente/log ```
|
2020-05-16 11:47:13 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## lm_sensors realtime display
|
|
|
|
```bash
|
2020-05-16 11:47:13 +02:00
|
|
|
watch sensors
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-16 11:47:13 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## analyze startup time
|
|
|
|
```bash
|
2020-05-16 11:47:13 +02:00
|
|
|
systemd-analyze plot > detail[X].svg
|
|
|
|
systemd-analyze blame > detail[X].txt
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-05-30 17:49:14 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## add kernel patch
|
|
|
|
```bash
|
2020-06-01 21:36:59 +02:00
|
|
|
patch -Np1 -i *file*
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-06-01 21:36:59 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## create mkinitcpio
|
|
|
|
```bash
|
2020-06-22 17:03:39 +02:00
|
|
|
sudo mkinitcpio -g /boot/initramfs-[kernel].img -k [kernel from /usr/lib/modules]
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-06-01 21:36:59 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## depmod
|
|
|
|
```bash
|
2020-06-25 17:45:13 +02:00
|
|
|
depmod -a
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-06-25 17:45:13 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## network traffic
|
|
|
|
```bash
|
2020-06-22 17:03:39 +02:00
|
|
|
nload
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-06-22 17:03:39 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## pacman remove old packages
|
|
|
|
```bash
|
2020-06-22 17:03:39 +02:00
|
|
|
pacman -Sc
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-06-22 17:03:39 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## Video as background
|
|
|
|
```bash
|
2020-08-17 07:54:59 +02:00
|
|
|
xwinwrap -g 1920x1080 -ov -- mpv -wid WID --loop --no-audio --keepaspect=no --no-osc <file>
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-07-10 12:39:07 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
### testing
|
|
|
|
```bash
|
2020-08-17 21:31:58 +02:00
|
|
|
xwinwrap -g 1920x1080 -ov -- mpv -wid WID --loop --no-audio --keepaspect=no --no-osc --vo=gpu /home/marc/Bilder/Backgrounds/Animated\ Backgrounds/Dune/Dune.mp4
|
|
|
|
xwinwrap -g 1920x1080 -ov -- mpv -wid WID --loop --no-audio --keepaspect=no --no-osc --vo=vaapi /home/marc/Bilder/Backgrounds/Animated\ Backgrounds/Dune/Dune.mp4
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-08-17 21:31:58 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## generate keys per computer, only once!
|
|
|
|
```bash
|
2020-08-23 12:23:23 +02:00
|
|
|
ssh-keygen
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-08-23 12:23:23 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## allow access through ssh key
|
|
|
|
```bash
|
2020-08-23 12:23:23 +02:00
|
|
|
ssh-copy-id -i <file location> <user>@<ip/domain>
|
2020-09-03 19:59:04 +02:00
|
|
|
ssh-copy-id -i ~/.ssh/id_rsa.pub <user>@<ip/domain>
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-09-03 19:59:04 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## Ventoy
|
|
|
|
### install
|
|
|
|
```bash
|
2020-09-03 19:59:04 +02:00
|
|
|
sudo bash Ventoy2Disk.sh -i -g /dev/XXX
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
|
|
|
### update
|
|
|
|
```bash
|
2020-09-07 19:25:55 +02:00
|
|
|
sudo bash Ventoy2Disk.sh -u /dev/XXX
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-09-07 19:25:55 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## PATH Variables
|
|
|
|
```
|
2020-09-07 19:57:28 +02:00
|
|
|
/home/marc/.local/bin:/home/marc/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
2020-09-07 19:32:34 +02:00
|
|
|
|
2020-09-17 20:42:16 +02:00
|
|
|
## export path Variables
|
|
|
|
```bash
|
2020-09-07 19:57:28 +02:00
|
|
|
export PATH="$PATH":<path>
|
2020-09-17 20:42:16 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Dots per inch
|
|
|
|
```bash
|
|
|
|
xdpyinfo | grep -B 2 resolution
|
|
|
|
```
|
2020-09-21 20:54:10 +02:00
|
|
|
|
|
|
|
## Bash ffmpeg batch convert
|
|
|
|
```bash
|
2020-10-09 21:22:14 +02:00
|
|
|
bash <pathto>/lower-vol.sh <input ext> <output ext> <input directory> <output directory> <other options>
|
2020-09-21 20:54:10 +02:00
|
|
|
```
|
|
|
|
```bash
|
2020-10-09 21:22:14 +02:00
|
|
|
bash "/home/marc/GitProjects/ffmpeg-lower-vol/lower-vol.sh" flac flac "/home/marc/Downloads/newmusik/" "/home/marc/Downloads/newmusik/converted" "-filter:a volume=0.25"
|
2020-09-21 20:54:10 +02:00
|
|
|
```
|
2020-09-30 12:51:41 +02:00
|
|
|
|
|
|
|
## Downgrade package
|
|
|
|
```bash
|
|
|
|
downgrade <packagename>
|
|
|
|
```
|
2020-10-09 21:22:14 +02:00
|
|
|
|
|
|
|
## Typometer
|
|
|
|
First, extract the .zip file and then the .jar file.
|
|
|
|
Enter the newly created folder and open a terminal at that location. (Should be `<download location>/typometer-x.x.x`)
|
|
|
|
Enter the following line in the terminal:
|
|
|
|
```bash
|
|
|
|
java com.pavelfatin.typometer.Application
|
|
|
|
```
|
|
|
|
|
|
|
|
*Important: Use BASH instead of FISH, as the colors in FISH confuse the program.*
|
2020-10-28 19:28:41 +01:00
|
|
|
|
|
|
|
## List number of items in directory
|
|
|
|
```bash
|
|
|
|
ls -1 | wc -l
|
|
|
|
```
|
|
|
|
|
|
|
|
## List size of directory
|
|
|
|
```bash
|
|
|
|
du -sh
|
|
|
|
```
|
|
|
|
|
|
|
|
## List usage of all partitions
|
|
|
|
```bash
|
|
|
|
df -h
|
|
|
|
```
|