FreeBSD : How to setup a software RAID-1

First, avoid any problem by getting two identical hard drive (or at least, same size and speed at least if not from same manufacturer). This tutorial assume both your hard disk are “da0” and “da1“. If you don’t know you’re devices name, simply use “dmesg” or “df -h” command to find out. First, let’s temporary… Read More »

Linux : Search and replace across multiple files

To search and replace across multiple text file on a Linux/Unix system, use the following command : find . -name “*.extension” -print | xargs sed -i ‘s/search_for_text/replace_with_text/g’ So, as example, let’s assume you want to replace an IP address in multiple Bind zone file (using the extension .hosts) and replace IP address 10.10.1.1 for 192.168.1.1… Read More »

VMware Server : PAM unable to dlopen pam_unix2.so

Using VMware Server on RedHat Enterprise Linux, you may expect this error in log file /var/log/secure : PAM unable to dlopen(/lib/security/pam_unix2.so PAM [error: /lib/security/pam_unix2.so: cannot open shared object file: No such file or directory] PAM adding faulty module: /lib/security/pam_unix2.so Actually, this error does not seem to affect the functionality of VMware Server. To work around… Read More »

Windows : How to rename a power plan name

On Windows Vista/7, there is no GUI option to rename a power plan. You must use the “powercfg” command line utility to achieve this task. Open the command line (Start, Run – or type directly in the bottom search bar) : cmd Then, in the command prompt, type this command to list all power plan… Read More »

OpenX : Statistics no longer working after upgrade from v2.8.5 to v2.8.7

After upgrading OpenX AdServer from version 2.8.5 to 2.8.7, you may experience a problem with statistics – OpenX engine is no longer recording stats from campaign delivery. This is a good idea to have a look at the log file, located at <openx>/var/debug.log. You probably will see this warning : OX-maintenance-4ea48eac6cd00 [info]  Running Maintenance Engine… Read More »

Category: Web

Mac : How to convert Windows text file to unix

Windows text editors add a tailing character ( ^M ) for line break. To get a real Unix flat file without theses characters, simply run the following command in terminal : tr ‘\r’ ‘\n’ < Windows_Text_File.txt > Unix_Text_File.txt

Category: Mac

Mac : How to Page up and Page down in terminal?

Using the full size desktop Apple keyboard, simply hold down SHIFT key + Page up or Page down. With a MacBook Pro, there is no such keys (Page up/Page down)… Just hold down function key ( fn ) + SHIFT + ARROW UP and/or DOWN.

Category: Mac