rpm and yum rescue tips on Fedora

April 22nd, 2008 mysurface

You have to be careful when you run yum update and yum install, DON’T force kill it, kill -9 or pkill -9. Those action are consider very dangerous, may lead you to losing certain files. Seriously, I hate yum, when I really wanna cancel the process in the middle, by hitting ctrl+c doesn’t really work! [...]

Posted in Admin, awk, rpm, which, yum | Hits: 67079 | 2 Comments »

what is your 10 common linux commands?

October 27th, 2007 mysurface

Dear command line ninjas, Mr CLI and keyboard pianist: What is your regular command you use? I am sure you must thinking of ls and cd. Yeah, they are common for every users, but how about the rest of them? I have construct a combos of commands to help you identify your top ten linux [...]

Posted in awk, column, Common, grep, head, history, nl, sort | Hits: 90449 | 40 Comments »

array and for loop in awk

June 25th, 2007 mysurface

grep is always a useful tools to help analyze logs. When the logs are managed nicely in rows and columns format, awk will be much more efficient compared to grep. Refers to simple examples of awk here. Awk support array and for loops. Let say I have IP logs that access to my servers time [...]

Posted in awk, Text Manipulation | Hits: 48810 | No Comments »

pass variable to awk from outside

October 17th, 2006 mysurface

Many people uses awk in their shell script, but they need to pass variable to awk for manipulation, it is not difficult, bellow is a simple example. awk ‘END { print myval }’ myval=`pwd` data.txt This example is to show you, I successfully pass a value from outside, at the END of the manipulation, print [...]

Posted in awk, Bash, Text Manipulation | Hits: 30543 | 2 Comments »

awk, simple but efficient text manipulation tool.

October 17th, 2006 mysurface

Awk is a simple and efficient for text manipulation, it is use to extract info from text data files especially the data is in the table form with columns and rows and each fields (columns) is separate by a common separator (usually a blank space). awk ‘/keyword/’ data.txt It does the same as grep like [...]

Posted in awk, Text Manipulation | Hits: 27171 | 3 Comments »