Linux commands I sometimes use


Linux
#x11vnc#KDE#file-managment

I often have to look these commands up, so I am keeping a copy here.



Generate a CA key pair
ssh-keygen -t ed25519 -f ~/.ssh/ssh_user_ca -C "User CA"
Sign a public ssh for 12 hours
ssh-keygen -s ~/.ssh/ssh_user_ca -I "User_Laptop" -n username -V +12h ~/.ssh/ssh_user_ca.pub
ssh using custom port and forwards network traffic from port 58001 on your local machine to port 58001 on the remote server
ssh -p 420 -L 58001:localhost:58001 user@ssh.dogwhelk.ca
Start X11nvc using password file and ssl on port 58001
x11vnc -rfbauth ~/.vnc/passwd -rfbport 58001 -localhost -ssl
Delete files older than two days in /tmp
find /tmp -type f -mtime +2 -delete
move files to .
find . -type f -mindepth 2 -exec mv -t . {} +
Restart KDE Plasma
plasmashell --replace & disown
Delete a specific file name recursively
find . -type f -name "notes.txt" -delete
convert all .flac files in the current directory into .mp3 files
for f in *.flac; do ffmpeg -i "$f" -ab 320k "${f%.flac}.mp3"; done