Subscribe for email updates

Get all updates to your inbox to stay tune.

Curve tracing programs - Draw sin(x) curve using Graphics programming in C

Learn how to draw curve tracing graphics programs in c language

Graphics programming in C

Learn how to write basic and advanced graphics programming in c language

Curve tracing programs - Draw Cos(x) curve using Graphics programming in C

Learn how to draw curve tracing graphics programs in c language

Make file tutorial

A step by step guide to learn how to write make file in Linux with examples

Monday, December 17, 2012

How to change core dump file path location and file name pattern - in Linux


Core files are very useful to debug program which are terminated abruptly.But the core files are larger in size. Due to the amount of space require to generate core file, it may require to change default core file path location to some other location.
Follow the steps to change default core file location to /tmp/user/
echo "/tmp/user/core.%p" > /proc/sys/kernel/core_pattern

Lets try something more interesting. Looking at the core pattern, one can identify following things.

Thursday, December 6, 2012

How to delete spaces using sed in Linux

I faced a issue where my configuration file contains name=value pairs. But automation scripts generated configuration file which contains "name = value". There is space between name and value. To delete the spaces, I used the following command.
#cat inputfilename | sed 's/ //g' > outputfilename

Wednesday, December 5, 2012

Extract pre/post install,uninstall scripts from RPM in Linux

It is quite useful sometimes to debug by extracting the pre,post install scripts and post uninstall scripts from RPM. Or to verify what actions being performed by rpm scripts during install, upgrade and uninstall process. To extract rpm scripts run the following command.
#rpm -qp --scripts > ./rpm_scripts
Open ./rpm_scripts file to view the scripts.