If you need to change the hostname of an existing munin node with a lot of data, and you want to retain all this existing historical data, follow this procedure:
[Read more…]
Fix locale issues in Mac OS X
I faced a problem with locales in terminal on Mac OS X Lion. Midnight Commander didn’t want to display Cyrillic symbols in filenames and directories, on my remote media-Server I’ve been getting messages like “warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)”. The solution is fairly simple – add these two lines to ~/.bash_profile (by default is seems to be missing, so create the file):
1 2 3 4 | ids:~ id$ cat .bash_profile export LC_CTYPE=en_US.UTF-8 export LC_ALL=en_US.UTF-8 |
Terminator
Everyone of you know the default GNOME Terminal or the KDE-Konsole, this terminals are usable only after some tweaks like color scheme or the hotkey binding.
I work usually with a lot different [Read more…]
Working with HDD
This will be a little bigger thread (and I hope it will grow with time) about working with hard disk drives. All about filesystem creation, filesystem health checks and other stuff for HDD.
[Read more…]
Remove logs older than X days
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 |
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 |
Finally if you decided to remove the files – the final command to delete them:
1 | find -mtime +600 | xargs rm |