How to cut few lines from a big file using sed

ARUN Post in LINUX COMMANDS
0

Below command will cut lines 90 to 154 from  file.txt  and copy that to cut_file.txt

sed -n ’90,154p’ file.txt > cut_file.txt

 

Cpanel shows incorrect disk space usage in emails

ARUN Post in WHM BACKEND, WHM SCRIPTS
0

[      /scripts/generate_maildirsize --confirm --verbose USERNAME       ]

How to reset mysql user password in linux through command prompt

ARUN Post in MYSQL
0

Login to mysql.

mysql -u root -p

In mysql prompt use

mysql> use mysql;

Now change the password for user “arun”   to  ”secret123″ as below :

[    mysql> update user set password=PASSWORD("secret123") where User='arun';     ]

 

Path of toplog

ARUN Post in FILE PATH ( conf, logs etc), LOG FILES, WHM BACKEND
0

/var/log/dcpumon/toplog…..

Repair all mysql database on a server

ARUN Post in MYSQL
0

mysqlcheck -Ar

ERROR: PleskFatalException Unable to connect to database: saved admin password is incorrect.

ARUN Post in PLESK FRONTEND
0

While trying to access the plesk admin page we get the below error :

ERROR: PleskFatalException Unable to connect to database: saved admin password is incorrect.

Solution :

Try resetting the admin password from within mysql.

You can get the details about resetting root mysql password using the link below. Change the commands accordingly an reset the password for  user  ”admin”

http://webhostingdevelopment.com/forum/index.php/2011/07/how-to-reset-mysql-root-password-in-linux-centos/

-bash: httpd: command not found

ARUN Post in Uncategorized
0

root@vps [~]# httpd -l
-bash: httpd: command not found
root@vps [~]#

Solution :

root@vps1 [/usr/bin]# ln -s /usr/local/apache/bin/httpd
root@vps1 [/usr/bin]# cd

/etc/cron.weekly/chkrootkit.sh: line 3: mail: command not found

ARUN Post in ERROR
0

/etc/cron.weekly/chkrootkit.sh:

/etc/cron.weekly/chkrootkit.sh: line 3: mail: command not found
/etc/cron.weekly/rkhunter.sh:

/etc/cron.weekly/rkhunter.sh: line 2: rkhunter: command not found

Solution :

yum install mailx.x86_64

/usr/bin/perl: error while loading shared libraries: libc.so.6: failed to map segment from shared object: Cannot allocate memory

ARUN Post in ERROR, WHM BACKEND
0

Getting the below error in apache error logs and the website giving a Internal server error 500

Solution :

Check  RLimitMEM is enabled. If so disable and restart apache.

vi /usr/local/apache/conf/httpd.conf

 

test

ARUN Post in LOG ANALYSIS
0

test