filesystems/index.md
... ...
@@ -1,5 +1,6 @@
1 1
# filesystems
2 2
3 3
* [btrfs](btrfs)
4
+* [lvm](lvm)
4 5
* [mdadm](mdadm)
5 6
* [zfs](zfs)
filesystems/lvm.md
... ...
@@ -0,0 +1,2 @@
1
+# lvm
2
+https://tldp.org/HOWTO/LVM-HOWTO/recipemovevgtonewsys.html
linux/at.md
... ...
@@ -1,11 +0,0 @@
1
-# at
2
-
3
-```
4
-at -t MMDDhhmm
5
-at> echo 'hello world'
6
-at> ^D
7
-```
8
-
9
-[ref][]
10
-
11
-[ref]: https://www.computerhope.com/unix/uat.htm
linux/fonts.md
... ...
@@ -1,25 +0,0 @@
1
-# fonts
2
-
3
-if font isn't working run `fc-cache -fv`
4
-
5
-```
6
- 1014 xset +fp /usr/share/fonts/local
7
- 1015 sudo xset +fp /usr/share/fonts/local
8
- 1016 ll /usr/lib/X11/fonts/misc/
9
- 1017 systemctl --all | grep xfs
10
- 1018 fc-cache -fv
11
- 1019 xset +fp /usr/share/fonts/local
12
- 1020 ll /usr/share/fonts
13
- 1021 ll /usr/share/fonts/local
14
- 1022 xset +fp /usr/share/fonts/
15
- 1023 xset +fp /usr/share/fonts/local
16
- 1024 sudo -i
17
- cd /usr/share/fonts/local
18
- mkfontscale
19
- mkfontdir
20
- 1025 xset +fp /usr/share/fonts/local
21
- 1026 xset -q
22
- 1027 fc-cache -fv
23
- 1028 xlsfonts | grep -i tamzen
24
-
25
-```
linux/i3lock.md
... ...
@@ -1,9 +0,0 @@
1
-# i3lock
2
-
3
-lockscreen commands (https://www.reddit.com/r/unixporn/comments/8z15f9/i3lock_with_pixeleffect/)
4
-
5
-```zsh
6
-ICON="/home/pyratebeard/tmp/stop2.png" ; TMPBG="/tmp/lockscreen.jpg" ; RES=$(xrandr | grep 'current' | sed -E 's/.*current\s([0-9]+)\sx\s([0-9]+).*/\1x\2/') ; ffmpeg -f x11grab-video_size $RES -y -i $DISPLAY -vf frei0r=pixeliz0r=0.02:0.02 -vframes 1 $TMPBG -loglevel quiet
7
-ICON="/home/pyratebeard/tmp/stop2.png" ; TMPBG="/tmp/lockscreen.jpg" ; RES=$(xrandr | grep 'current' | sed -E 's/.*current\s([0-9]+)\sx\s([0-9]+).*/\1x\2/') ; ffmpeg -f x11grab -video_size $RES -y -i $DISPLAY -i $ICON -filter_complex "boxblur=5:1,overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2" -vframes 1 $TMPBG -loglevel quiet
8
-/home/pyratebeard/src/warez/i3lock-fancy-multimonitor/lock -p
9
-```
linux/index.md
... ...
@@ -1,89 +1,45 @@
1 1
# linux
2 2
3
-## a
4
-* [apt_dpkg](apt_dpkg)
5
-* [at](at)
6
-
7
-## b
8
-* [bin](bin)
9
-* [bluetooth](bluetooth)
10
-
11
-## c
12
-* [csgo](csgo)
13
-
14
-## d
15
-* [dhcpcd](dhcpcd)
16
-* [dmidecode](dmidecode)
3
+## art
17 4
* [durdraw](durdraw)
18 5
19
-## e
20
-
21
-## f
22
-* [fallout4](fallout4)
23
-* [flatpak](flatpak)
24
-* [fonts](fonts)
25
-
26
-## g
27
-
28
-## h
29
-
30
-## i
31
-* [i3lock](i3lock)
32
-* [init](init)
33
-
34
-## j
35
-* [journalctl](journalctl)
36
-
37
-## k
38
-* [keymaps](keymaps)
39
-
40
-## l
41
-* [logrotate](logrotate)
42
-* [lvm](lvm)
43
-
44
-## m
45
-* [man_pages](man_pages)
46
-* [mount](mount)
6
+## audio
47 7
* [mpd](mpd)
48
-* [mpv](mpv)
49
-
50
-## n
51
-
52
-## o
53
-
54
-## p
55
-* [pacman](pacman)
56 8
* [pacmd](pacmd)
57 9
* [pactl](pactl)
58
-* [processes](processes)
59
-
60
-## q
10
+* [spotifyd](spotifyd)
61 11
62
-## r
63
-* [ricing](ricing)
64
-* [rpm](rpm)
65
-* [rsync](rsync)
66
-* [rtv](rtv)
12
+## connectivity
13
+* [bluetooth](bluetooth)
67 14
68
-## s
69
-* [samba](samba)
70
-* [sar](sar)
15
+## documentation
16
+* [bin](bin)
17
+* [man_pages](man_pages)
71 18
* [scanning](scanning)
72
-* [spotifyd](spotifyd)
73
-* [systemctl](systemctl)
74
-* [sysv](sysv)
75 19
76
-## t
77
-* [truncate](truncate)
20
+## logging
21
+* [journalctl](journalctl)
22
+* [logrotate](logrotate)
23
+* [sar](sar)
78 24
79
-## u
25
+## package managers
26
+* [apt_dpkg](apt_dpkg)
27
+* [flatpak](flatpak)
28
+* [pacman](pacman)
29
+* [rpm](rpm)
80 30
81
-## v
31
+## ricing
32
+* [ricing](ricing)
82 33
83
-## w
84
-* [w3m](w3m)
34
+## steam issues
35
+* [csgo](csgo)
36
+* [fallout4](fallout4)
85 37
86
-## x
38
+## system utilities
39
+* [dhcpcd](dhcpcd)
40
+* [dmidecode](dmidecode)
41
+* [keymaps](keymaps)
42
+* [mount](mount)
87 43
* [xclip](xclip)
88 44
* [xdotool](xdotool)
89 45
* [xev](xev)
... ...
@@ -91,16 +47,26 @@
91 47
* [xmodmap](xmodmap)
92 48
* [xprop](xprop)
93 49
94
-## y
95
-
96
-## z
50
+## video
51
+* [mpv](mpv)
97 52
53
+## unsorted
98 54
55
+### scsi
99 56
echo 1 > /sys/class/scsi_device/2:0:1:0/device/rescan
100 57
echo "- - -" > /sys/class/scsi_host/host2/scan
101 58
59
+### key presses
102 60
* view keys being pressed
103
-https://unix.stackexchange.com/questions/144390/print-currently-pressed-keys-to-stdout-and-read-them-line-by-line
104 61
```
105 62
stdbuf -o0 showkey -a | cat -
106 63
```
64
+
65
+https://unix.stackexchange.com/questions/144390/print-currently-pressed-keys-to-stdout-and-read-them-line-by-line
66
+
67
+### truncate
68
+https://unix.stackexchange.com/questions/68523/find-and-remove-large-files-that-are-open-but-have-been-deleted
69
+
70
+### rtv
71
+rtv --enable-media (to use mailcap, although it seems to default)
72
+export RTV_BROWSER=qutebrowser
linux/init.md
... ...
@@ -1,11 +0,0 @@
1
-# init
2
-
3
-* to check which init program is being used incant
4
-```
5
-sudo stat /proc/1/exe
6
-```
7
-* if the file is `/sbin/init` incant
8
-```
9
-sudo stat /sbin/init
10
-sudo /sbin/init --version
11
-```
linux/lvm.md
... ...
@@ -1,2 +0,0 @@
1
-# lvm
2
-https://tldp.org/HOWTO/LVM-HOWTO/recipemovevgtonewsys.html
linux/processes.md
... ...
@@ -1,16 +0,0 @@
1
-# processes
2
-
3
-## zombies
4
-check the number of [zombie processes][]
5
-```
6
-ps aux | awk '$8 ~ /Z/ { print }' | wc -l
7
-```
8
-
9
-## sort by resource usage
10
-find [top processes][] sorted by mem or cpu usage
11
-```
12
-ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head
13
-```
14
-
15
-[zombie processes]: https://www.howtogeek.com/119815/htg-explains-what-is-a-zombie-process-on-linux/
16
-[top processes]: https://tecmint.com/find-linux-processes-memory-ram-cpu-usage
linux/ricing.md
... ...
@@ -1,5 +1,41 @@
1 1
# ricing
2 2
3
+## i3lock
4
+
5
+lockscreen commands (https://www.reddit.com/r/unixporn/comments/8z15f9/i3lock_with_pixeleffect/)
6
+
7
+```zsh
8
+ICON="/home/pyratebeard/tmp/stop2.png" ; TMPBG="/tmp/lockscreen.jpg" ; RES=$(xrandr | grep 'current' | sed -E 's/.*current\s([0-9]+)\sx\s([0-9]+).*/\1x\2/') ; ffmpeg -f x11grab-video_size $RES -y -i $DISPLAY -vf frei0r=pixeliz0r=0.02:0.02 -vframes 1 $TMPBG -loglevel quiet
9
+ICON="/home/pyratebeard/tmp/stop2.png" ; TMPBG="/tmp/lockscreen.jpg" ; RES=$(xrandr | grep 'current' | sed -E 's/.*current\s([0-9]+)\sx\s([0-9]+).*/\1x\2/') ; ffmpeg -f x11grab -video_size $RES -y -i $DISPLAY -i $ICON -filter_complex "boxblur=5:1,overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2" -vframes 1 $TMPBG -loglevel quiet
10
+/home/pyratebeard/src/warez/i3lock-fancy-multimonitor/lock -p
11
+```
12
+
13
+## fonts
14
+
15
+if font isn't working run `fc-cache -fv`
16
+
17
+```
18
+ 1014 xset +fp /usr/share/fonts/local
19
+ 1015 sudo xset +fp /usr/share/fonts/local
20
+ 1016 ll /usr/lib/X11/fonts/misc/
21
+ 1017 systemctl --all | grep xfs
22
+ 1018 fc-cache -fv
23
+ 1019 xset +fp /usr/share/fonts/local
24
+ 1020 ll /usr/share/fonts
25
+ 1021 ll /usr/share/fonts/local
26
+ 1022 xset +fp /usr/share/fonts/
27
+ 1023 xset +fp /usr/share/fonts/local
28
+ 1024 sudo -i
29
+ cd /usr/share/fonts/local
30
+ mkfontscale
31
+ mkfontdir
32
+ 1025 xset +fp /usr/share/fonts/local
33
+ 1026 xset -q
34
+ 1027 fc-cache -fv
35
+ 1028 xlsfonts | grep -i tamzen
36
+
37
+```
38
+
3 39
## xsetroot
4 40
```
5 41
xsetroot -solid #111111
linux/rsync.md
... ...
@@ -1,6 +0,0 @@
1
-# rsync
2
-
3
-### copy files over ssh using compression
4
-```
5
-rsync -avz -e ssh --progress pyratebeard@remote_server:/path/to/file ./local/path
6
-```
linux/samba.md
... ...
@@ -1,9 +0,0 @@
1
-# samba
2
-
3
-## test from linux system using kerberos
4
-```
5
-kinit <username>
6
-smbclient -L $(hostname) -k
7
-smbclient //$(hostname)/<sharename> -k
8
-smb: \> dir
9
-```
linux/systemctl.md
... ...
@@ -1,48 +0,0 @@
1
-# systemctl
2
-
3
-also see [journalctl](journalctl)
4
-
5
-```bash
6
-systemctl list-units [ --all | --type=service ]
7
-```
8
-
9
-- show all enabled and disabled services
10
-```bash
11
-systemctl list-unit-files
12
-```
13
-
14
-#### create service file
15
-```
16
-vi /etc/systemd/system/<name>.service
17
-```
18
-
19
-([manage systemd][])
20
-
21
-## user services
22
-run `systemctl` (without sudo) and with the `--user` option
23
-
24
-service files are created under '$HOME/.config/systemd/user'
25
-
26
-### example user service file
27
-```
28
-[Unit]
29
-Description=This is an example
30
-
31
-[Service]
32
-ExecStart=/path/to/command
33
-
34
-[Install]
35
-WantedBy=default.target
36
-```
37
-([writing user units][])
38
-
39
-enable and start the user service (without sudo)
40
-```
41
-systemctl --user enable <service>
42
-systemctl --user start <service>
43
-systemctl --user status <service>
44
-```
45
-
46
-
47
-[manage systemd]: https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units
48
-[writing user units]: https://wiki.archlinux.org/index.php/Systemd/User#Writing_user_units
linux/sysv.md
... ...
@@ -1,6 +0,0 @@
1
-# sysv
2
-
3
-* set service runlevels
4
-```
5
-sysv-rc-conf
6
-```
linux/truncate.md
... ...
@@ -1,2 +0,0 @@
1
-# truncate
2
-https://unix.stackexchange.com/questions/68523/find-and-remove-large-files-that-are-open-but-have-been-deleted
linux/w3m.md
... ...
@@ -1,19 +0,0 @@
1
-# w3m
2
-
3
-```
4
-w3m <url>
5
-```
6
-
7
-## keybindings
8
-
9
-| keybinding | description |
10
-| --- | --- |
11
-| H | show hot keys menu |
12
-| B | exit hot keys menu |
13
-| space | page down |
14
-| b | page up |
15
-| T | open tab |
16
-| {} | switch tabs |
17
-| C-q | close tab |
18
-| U | change current url |
19
-| Esc-U | go to new url |
networking/index.md
... ...
@@ -1,6 +1,6 @@
1 1
# networking
2 2
3
-## adminstration
3
+## administration
4 4
* [dig](dig)
5 5
* [nmcli](nmcli)
6 6
* [subnet_cheatsheet](subnet_cheatsheet)
... ...
@@ -21,5 +21,9 @@
21 21
* [haproxy](haproxy)
22 22
* [envoy](envoy)
23 23
24
+## transferring
25
+* [rsync](rsync)
26
+* [samba](samba)
27
+
24 28
## vpn
25 29
* [openvpn](openvpn)
networking/rsync.md
... ...
@@ -0,0 +1,6 @@
1
+# rsync
2
+
3
+### copy files over ssh using compression
4
+```
5
+rsync -avz -e ssh --progress pyratebeard@remote_server:/path/to/file ./local/path
6
+```
networking/samba.md
... ...
@@ -0,0 +1,9 @@
1
+# samba
2
+
3
+## test from linux system using kerberos
4
+```
5
+kinit <username>
6
+smbclient -L $(hostname) -k
7
+smbclient //$(hostname)/<sharename> -k
8
+smb: \> dir
9
+```
programming/nubbins.md
... ...
@@ -1,8 +1,25 @@
1 1
# nubbins
2 2
3
-### compare contents of two directories
3
+## compare contents of two directories
4 4
```
5 5
for f in $(find dir1/ -type f | awk -F/ '{print $NF}') ; do
6 6
find dir2/ -type f -name "$f" -exec echo {} is in both \;
7 7
done
8 8
```
9
+
10
+## processes
11
+
12
+### zombies
13
+check the number of [zombie processes][]
14
+```
15
+ps aux | awk '$8 ~ /Z/ { print }' | wc -l
16
+```
17
+
18
+### sort by resource usage
19
+find [top processes][] sorted by mem or cpu usage
20
+```
21
+ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head
22
+```
23
+
24
+[zombie processes]: https://www.howtogeek.com/119815/htg-explains-what-is-a-zombie-process-on-linux/
25
+[top processes]: https://tecmint.com/find-linux-processes-memory-ram-cpu-usage
software/at.md
... ...
@@ -0,0 +1,11 @@
1
+# at
2
+
3
+```
4
+at -t MMDDhhmm
5
+at> echo 'hello world'
6
+at> ^D
7
+```
8
+
9
+[ref][]
10
+
11
+[ref]: https://www.computerhope.com/unix/uat.htm
software/cron.md
... ...
@@ -0,0 +1 @@
1
+# cron
software/index.md
... ...
@@ -6,6 +6,9 @@
6 6
## backups
7 7
* [borg](borg)
8 8
9
+## browsers
10
+* [w3m](w3m)
11
+
9 12
## communication systems
10 13
* [exim4](exim4)
11 14
* [gopher](gopher)
... ...
@@ -24,6 +27,11 @@
24 27
* [oracle](oracle)
25 28
* [postgresql](postgresql)
26 29
30
+## init processes
31
+* [init](init)
32
+* [systemd](systemd)
33
+* [sysv](sysv)
34
+
27 35
## internet protocols
28 36
* [ftp](ftp)
29 37
* [ldap](ldap)
... ...
@@ -34,6 +42,10 @@
34 42
* [ntfy](ntfy)
35 43
* [nagios](nagios)
36 44
45
+## scheduling
46
+* [at](at)
47
+* [cron](cron)
48
+
37 49
## terminals
38 50
* [tmux](tmux)
39 51
software/init.md
... ...
@@ -0,0 +1,11 @@
1
+# init
2
+
3
+* to check which init program is being used incant
4
+```
5
+sudo stat /proc/1/exe
6
+```
7
+* if the file is `/sbin/init` incant
8
+```
9
+sudo stat /sbin/init
10
+sudo /sbin/init --version
11
+```
software/systemd.md
... ...
@@ -0,0 +1,50 @@
1
+# systemd
2
+
3
+## systemctl
4
+
5
+also see [journalctl](/linux/journalctl)
6
+
7
+```bash
8
+systemctl list-units [ --all | --type=service ]
9
+```
10
+
11
+- show all enabled and disabled services
12
+```bash
13
+systemctl list-unit-files
14
+```
15
+
16
+#### create service file
17
+```
18
+vi /etc/systemd/system/<name>.service
19
+```
20
+
21
+([manage systemd][])
22
+
23
+## user services
24
+run `systemctl` (without sudo) and with the `--user` option
25
+
26
+service files are created under '$HOME/.config/systemd/user'
27
+
28
+### example user service file
29
+```
30
+[Unit]
31
+Description=This is an example
32
+
33
+[Service]
34
+ExecStart=/path/to/command
35
+
36
+[Install]
37
+WantedBy=default.target
38
+```
39
+([writing user units][])
40
+
41
+enable and start the user service (without sudo)
42
+```
43
+systemctl --user enable <service>
44
+systemctl --user start <service>
45
+systemctl --user status <service>
46
+```
47
+
48
+
49
+[manage systemd]: https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units
50
+[writing user units]: https://wiki.archlinux.org/index.php/Systemd/User#Writing_user_units
software/sysv.md
... ...
@@ -0,0 +1,6 @@
1
+# sysv
2
+
3
+* set service runlevels
4
+```
5
+sysv-rc-conf
6
+```
software/w3m.md
... ...
@@ -0,0 +1,19 @@
1
+# w3m
2
+
3
+```
4
+w3m <url>
5
+```
6
+
7
+## keybindings
8
+
9
+| keybinding | description |
10
+| --- | --- |
11
+| H | show hot keys menu |
12
+| B | exit hot keys menu |
13
+| space | page down |
14
+| b | page up |
15
+| T | open tab |
16
+| {} | switch tabs |
17
+| C-q | close tab |
18
+| U | change current url |
19
+| Esc-U | go to new url |