Tag: line

Yum update. Error: rpmdb open failed

The “rpmdb open failed” error message is mostly received when the rpm databases __db.00* located under /var/lib/rpm directory are corrupted. This results in a “error: cannot open Packages database” message while installation/updatation of a package via yum. root@server [~]# yum update Loaded plugins: fastestmirror error: no dbpath has been set […]

invalid byte sequence for encoding “UTF8″

Error: root@host [~]#  psql databasename < dump.sql ERROR:  invalid byte sequence for encoding “UTF8″: 0xd1e9 HINT:  This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by “client_encoding”. The above error is received while restoring a pgsql dump and […]

ODBC support on a cPanel server

How to compile unix odbc on a cPanel server? On a cPanel server, the /scripts/easyapache script almost provides all the modules that are required to host the websites but the modules such as odbc has to be installed manually. You first have to install the devel packages for unixodbc, then […]

Linux : How to Resize images with the command line?

GIMP can do just about anything to an image but it can be time-consuming to fire it up just to resize an image. For ultra-quick manipulation, consider Imagemagick, a command-line image manipulation program. It doesn’t come installed by default and you’ll need to install it via you package manager (search […]

awk / cut: Skip First Two Fields and Print the Rest of Line

I’d like to skip first two or three fields at the the beginning of a line and print the rest of line. Consider the following input: This is a test Giving back more than we take I want my input file with the following output: a test more than we […]

mpt-status.h:6:28: error: linux/compiler.h: No such file or directory

You may receive the “linux/compiler.h: No such file or directory” error message while compiling ‘mpt-status’ tool with the kernel source. The error message looks like mpt-status.h:6:28: error: linux/compiler.h: No such file or directory make: *** [mpt-status] Error 1 The workaround of this issue is, to edit the mpt-status.h file which […]

Ubuntu: Rename an Account [ User ID ]

How do I rename a user name from ‘tom’ to ‘jerry’ under Ubuntu Linux? You need to use the usermod command. It can modify the system account files (such as /etc/passwd) to reflect the changes that are specified on the command line. The syntax is as follows: usermod -l {new-login-name} […]