Live Chat!

Gnu Global, the programmer’s friend

1 votos Vota!!

May 25th, 2010 mysurface

GNU Global (gtags) is a source code tagging system similar to ctags but more than that. I always use vim as my c/c++ source code editor, and using ctags to helps me travels from function call to function definition. I do write a post indicates how does ctags works with vim.
The reason I shifted to [...]

Posted in Developer, global, gtags, gvim, vi, vim | Hits: 46790 | 3 Comments »

vim: Jump to the last known cursor when file open

0 votos Vota!!

May 21st, 2010 mysurface

When dealing with source codes by using vim, I usually open and close the files repeatably. It will be good if vim can automatically jump me to the last known position when I reopen a file.
To have vim do so, you must have viminfo, which usually exist by default.
Add in the setting into your ~/.vimrc

if [...]

Posted in gvim | Hits: 45846 | 2 Comments »

sometimes, grep alone is enough to do the task

2 votos Vota!!

April 14th, 2009 mysurface

One thing that makes UNIXes command line so powerful is because of pipelines. Pipelines is a set of processes chained by their standard streams, so that the output of each process (stdout) feeds directly as input (stdin) of the next one. Simple words, pipelines pass the outcomes of a particular command as input to another [...]

Posted in Text Manipulation, grep | Hits: 176500 | 1 Comment »

Syslog: Sending log from remote servers to syslog daemon

2 votos Vota!!

July 23rd, 2008 mysurface

syslog is a standard for logging service in Linux, it usually run as daemon like syslogd or rsyslogd. Syslog daemon will be forward and store logs in /var/log directory, you may configure it to store at separate location if you want. (we will look into it later). And there is a major file that store [...]

Posted in Admin, logger, nc, rsyslogd, syslogd, tail | Hits: 99379 | No Comments »

Top Ten Processes Watcher

1 votos Vota!!

July 13th, 2008 mysurface

top command provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel. But if you want get something more specific, you must play some tricks on it. For example, I want a clean view of top [...]

Posted in head, tail, top, watch | Hits: 82174 | 1 Comment »

vim taglist plugin for developers

3 votos Vota!!

June 1st, 2008 mysurface

Taglist plugin provides vim to support source code browsing capabilities at sidebar. When you enable taglist, sidebar windows will be listing functions, classes, structures, enumerations, macro definitions and other parts of a source code file as shortcut. Shortcut will jump you to the particular portion of codes within a single page.

The taglist may [...]

Posted in vi, vim | Hits: 38981 | 3 Comments »

Discover user guides and manuals within your linux system

1 votos Vota!!

May 9th, 2008 mysurface

Do you realized that we can obtain a lots of user manuals and guideline documents from our system? There is a folder /usr/share/doc, you may find some useful docs already preinstalled by your distro. Those docs are in pdf or html format. I manage to find user manuals for valgrind, ipython, systemtap, boost etc.
I believes [...]

Posted in Common, echo, find | Hits: 35442 | 2 Comments »

vim with ctags for multi-level directory hierarchy

0 votos Vota!!

April 24th, 2008 mysurface

I have wrote a post regarding vim with ctags, introduces how ctags allows you to travel across source codes, searching for function, objects, variables definition. To jump from function call to function definition, I usually do ctrl+] in vim. It should works fine as it should have already configured by default from most of the [...]

Posted in Developer, Text Manipulation, ctags, vi, vim | Hits: 31996 | 5 Comments »

rpm and yum rescue tips on Fedora

1 votos Vota!!

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: 34228 | No Comments »

Obtain some system statistics from vmstat

1 votos Vota!!

December 8th, 2007 mysurface

vmstat know as virtual memory statistics reporter, but it gives more information the just only virtual memory.
Besides memory, it covers overall CPU usage, IO, Swap, Proc, System interupts and context switching. vmstat is pretty easy to use, ignores all other options, the normal usage will be looks like this:
vmstat [delay] [counts]
Let say, you want to [...]

Posted in Admin, date, tail, vmstat | Hits: 55237 | 4 Comments »