Inhaltsverzeichnis

Nützliche Befehle

find

find . -type f -exec chmod 600 {} \;
find . -type d -exec chmod 700 {} \;
find . -inum $inodenr -exec rm -i {} \;

umask

umask 077

openssl

openssl x509 -fingerprint -sha256 -in /path/to/cert.pem
openssl x509 -fingerprint -sha1 -in /path/to/cert.pem
openssl speed

eigene externe IP ermitteln

curl 'http://whatismyip.com/automation/n09230945NL.asp'

dd

Status aller dd-Instanzen anzeigen

killall -USR1 dd

Fortschrittsanzeige via pv (pipe viewer)

dd if=... | pv | dd of=... 
678MB 0:01:46 [4,37MB/s] [       <=>                ]

SQL

CREATE USER 'username'@'%'; #Darf sich von überall anmelden
CREATE USER 'username'@'localhost'; #Darf sich nur vom localhost anmelden
SET password FOR 'username'@'%' = password('PASSWORT');
CREATE DATABASE db_name;
GRANT ALL ON db_name.* TO 'username'@'%';
FLUSH PRIVILEGES;