Category Archive: tips

Jul 23

How to get user’s IP and hostname in PHP

To get user’s IP and hostname:

May 31

common command linux

vi : for write to file i: insert Ctrl+c -> to command line :wq -> write and quit x -> delete one character on the right d -> delete one line below grep: get value on a row from a file ex : more data_dummy.txt | grep status=ok awk : get value on a clumn …

Continue reading »

May 31

grep and awk to get value from the data

for the example this bunch of data 1492 user 002 20120527013000 data dummy 2173 user 001 20120527013000 data dummy 1699 user 008 20120527013000 data dummy 2444 user 006 20120527013000 data dummy 1658 user 007 20120527013000 data dummy 1437 user 004 20120527014 windows data dummy 1497 user 005 20120527014 windows data dummy 2072 user 003 20120527014 …

Continue reading »