Bash Snippets
A poar nützliche oda unsinnige Bash-Snippets, de ma öfter amoi braucht. Vül Spaß damit.
Kompletten mySQL-Dump erstöin
mysqldump -u root -p -A -R -E --triggers --single-transaction > full_backup.sql
Prozess vom Terminal löse
nohup sh -c '$1' &
PID von an Prozess herausfinden
ps -ax | grep $1 | grep -v ' grep '
Shutdown-Timer
sudo shutdown -h +$1
CPU limitieren
Manchmoi mecht ma an Prozess ned de höchste Priorität gebn. Dann is da Befehl "nice" bzw. "renice" ganz nice. Mit "nice" starten ma an neichn Prozess ($befehl) mit ana gwöhlten Priorität ($niceness).
nice -n $niceness $befehl
Mit "renice" setzn ma de Priorität von an Prozess, der scho rennt.
renice $niceness $options
Mögliche Optionen sand:
-p PID: Auswahl vom Prozess anhand da Prozessidentifikationsnummer-u NUTZER: Prozesse vom Nutzer NUTZER limitiern-g GROUPID: Auswahl von olle Prozesse mit da Prozessidentifikationsgruppe GROUPID