Useful CLI commands
Tuesday, Jul 14, 2020

I have decided to put some commands that I often need to lookup here:

$ git rm -r --cached file/folder

After pushing, removes file/folder from remote only.

Generate an ssh key

$ ssh-keygen -t ed25519 -a 100

Test server connection speeds

Server 1:

$ iperf3 -s -f K 

Server 2:

$ iperf3 -c server1 -f K

Add my SSH keys

$ curl -o ~/.ssh/authorized_keys

Secure SSH

$ echo "PasswordAuthentication no" >> /etc/ssh/sshd_config

Test Drive Read Speed

$ cat /dev/sda | pv -r > /dev/null

Test Drive Write Speed

$ dd if=/dev/zero bs=1k count=128k && rm
comments powered by Disqus