Sarajevo, Bosnia and Herzegovina

Run tcpdump as a daemon

Well you can’t run it as a daemon since there is no method for tcpdump (http://www.daemon-systems.org/man/tcpdump.8.html), but you can do a little trick. You can call nohup utility which allows to run command./process or shell script that can continue running in the background after you log out from a shell. In case of any errors you […]

Read more

Centos – log files

All major system log files are located in the /var/log directory in Centos Linux. cron — Logs for all cronjobs that are run on the server dmesg — Logs from dmesg program which is used to examine or control the kernel ring buffer. lastlog — The binary log that contains all of the last login […]

Read more

Quick way to remove duplicates from MySQL database

DROP TABLE IF EXISTS tmp;create table tmp like mytable; ALTER TABLE tmp ADD UNIQUE INDEX(text1, text2, text3, text4, text5, text6); insert IGNORE into tmp select * from mytable; delete from mytable where id not in ( select id from tmp); DROP TABLE IF EXISTS tmp;

Read more