tail -n 1500 log.log | more
tail -f -n 1500 log.log
ps -ef |grep processname |awk '{print $2}'|xargs kill -9
ps -ef |grep processname |grep -v grep | awk '{print $2}'| xargs echo Explain : ps -ef --> ps list processes . -e show all processes , not just those belonging to the user . -f show processes in full format . grep processname --> find lines containing processname . grep -v grep --> filter out the grep process . awk 'print $2' --> tokenize a line by blank space . $2 take the second word . reference : http://blog.51cto.com/loofeer/775267 xargs --> construct the input param as a list . kill -9 --> kill all the processes by input pid