Linux: Unterschied zwischen den Versionen
Aus wiki
| Zeile 21: | Zeile 21: | ||
Remove comments & blank lines from a config file: | Remove comments & blank lines from a config file: | ||
egrep -v "^#|^$" file | egrep -v "^#|^$" file | ||
| + | |||
| + | == for loop == | ||
| + | for f in *.mp4; do ffmpeg -i $f -b:a 320K -vn $f.mp3; done | ||
Version vom 10. März 2015, 23:54 Uhr
Inhaltsverzeichnis
Security
Ubuntu Server Hardening
http://www.andrewault.net/2010/05/17/securing-an-ubuntu-server/ http://ubuntuforums.org/showthread.php?t=1002167
System Management
Install Kernel Headers
sudo apt-get install linux-headers-$(uname -r)
Remove all Kernel except the actual
sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')
Get active CPU scheduler
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
Want to kill every process accessing /data/sales on a Linux operating systems? Try:
fuser -k -15 -m /data/sales OR fuser -k -9 -m /data/sales
config file view
Remove comments & blank lines from a config file:
egrep -v "^#|^$" file
for loop
for f in *.mp4; do ffmpeg -i $f -b:a 320K -vn $f.mp3; done