Linux
Linux operating system tools and development notes.
Table of Contents
Useful Linux apps.
- fd-find
- ripgrep
- shakrdp/bat
- dandavison/delta
Remote Windows OS
rdesktop <win-serv-ip> -g 90% -r disk:mkmwp="$mwp" \
-u '<domain>\<username>' -p <password>
ImageMagick
Reduce image disk size.
# reduce size and compress images
for img in t1/*.jpg; do \
convert -strip -interlace Plane -gaussian-blur 0.05 -quality 85% \
-resize 50% -rotate 90 "$img" "${img%.*}.sm.jpg"; \
done
# rotate images
for img in *.jpg; do \
convert -rotate 90 "$img" "${img%.sm.*}.jpg"; \
done
List all listening network ports
$ sudo lsof -i -P -n | grep LISTEN
systemd-r 1003 systemd-resolve 14u IPv4 29127 0t0 TCP 127.0.0.53:53 (LISTEN)
sshd 1227 root 3u IPv4 29335 0t0 TCP *:22 (LISTEN)
sshd 1227 root 4u IPv6 29337 0t0 TCP *:22 (LISTEN)
apache2 1239 root 4u IPv6 29308 0t0 TCP *:80 (LISTEN)
apache2 1245 www-data 4u IPv6 29308 0t0 TCP *:80 (LISTEN)
apache2 1246 www-data 4u IPv6 29308 0t0 TCP *:80 (LISTEN)
cupsd 1350 root 6u IPv6 33965 0t0 TCP [::1]:631 (LISTEN)
cupsd 1350 root 7u IPv4 33966 0t0 TCP 127.0.0.1:631 (LISTEN)
dictd 2028 dictd 3u IPv4 34458 0t0 TCP 127.0.0.1:2628 (LISTEN)
tac_plus 8860 root 0u IPv4 98384 0t0 TCP *:49 (LISTEN)
tac_plus 8860 root 2u IPv6 98386 0t0 TCP *:49 (LISTEN)
qemu-ln 9858 user 6u IPv4 111247 0t0 TCP 127.0.0.1:49033 (LISTEN)
qemu-ln 9858 user 7u IPv4 111248 0t0 TCP 127.0.0.1:42407 (LISTEN)