zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Segmentation fault example

March 6, 2012 by Igor Drobot Leave a Comment


A tiny Segmentation fault study example (Page Fault).

This tiny code will produce a SIGSEGV (Segmentation fault) after compiling and executing

Create file example.c and fill it with this code: [Read more…]

Filed Under: Linux, Programming Tagged With: C, compiling, GCC, Segmentation fault, strace

Windows 7 USB installer

October 12, 2011 by Igor Drobot Leave a Comment

I hate CDs and DVDs, we are living in digital world and one gigabyte cost at the time about 0,03€ cents. I try to copy everything on my flash drives and HDDs. This post will show you how you can throw away your windows seven CD/DVD.

Insert a 8 or 16GB usb flash drive in your USB port. Careful! this [Read more…]

Filed Under: Bash, Linux, Windows Tagged With: flash drive, ISO, USB, Windows 7

Remove logs older than X days

July 12, 2011 by Igor Drobot Leave a Comment

The simplest way to remove files older than $NUMBER of days..

Dry run (files will be NOT deleted, you will see a list with files older than 100 days)

1
find -mtime +100 | less

find -mtime +100 | less

Another dry run, see what would be delete:

1
2
3
find -mtime +600 | xargs echo rm
rm /var/log/squid3/access.log.0
rm /var/log/squid3/access.log.2

find -mtime +600 | xargs echo rm rm /var/log/squid3/access.log.0 rm /var/log/squid3/access.log.2

Finally if you decided to remove the files – the final command to delete them:

1
find -mtime +600 | xargs rm

find -mtime +600 | xargs rm

Filed Under: Bash, Linux Tagged With: bash, find, Logs, rm, xargs

OpenVZ adjust RAM

June 30, 2011 by Igor Drobot Leave a Comment

Long Long time ago I wrote how I migrated from Xen to OpenVZ. This post will show you how to manage your VE memory.

First you set the veid=yournumberofve and the rest is copy paste ; Look at the examples:
[Read more…]

Filed Under: Bash, Debian, Linux, Virtualization Tagged With: OpenVZ, openvz set memory, VE, VM

WordPress Munin Plugin

June 13, 2011 by Igor Drobot 2 Comments

The original Plugin was written by Chris Bair, after some tunings it worked fine for me.

I made some useful modifications to this Plugin:
– Visualization of the number of Drafts
– Set table prefix (I hate hardcodet things)



And now how to use it, first you need to create a configuration file for the plugin(replace the needed credentials) [Read more…]

Filed Under: Bash, Linux, Monitoring, Networking Tagged With: Monitoring, Munin, munin-node, Wordpress

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • …
  • 11
  • Next Page »
Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok