All about linux command line


Untuk menemukan / scaning file size diatas 10 G pada linux cukup gunakan command berikut :
find / -size +10G -exec ls -lh {} \; | awk ‘{print $5″  –  “$9}’

Drop memory caches :
sync; echo 3 > /proc/sys/vm/drop_caches

tethereal -i eth1 -w “/home/foo/xxx.cap”
tethereal -i eth0 -f “host 180.250.xxx.xxx” -w “/home/foo/xxx.cap”

yum
yum –enablerepo=remi install mysql-server

 

 find /home/html -regex “.*\.\(tar.gz\)” > /tmp/log1

tail -f /usr/local/maldetect/event_log

 

#find string in file *php

http://www.liamdelahunty.com/tips/linux_find_string_files.php

#findout sum of mysql query

mysqladmin ext | grep -e ‘Com_\(update\|select\|insert\)’

 

restart dns:
1. ps -ef| grep named
2. kill pid nya
3. ketik: cdnamed
4. ketik: startnamed