Blog Archives for category commands

locate: can not stat () `/var/lib/mlocate/mlocate.db’

Got the below error while trying to use the locate command. locate: can not stat () `/var/lib/mlocate/mlocate.db’: No such file… Continue reading »

Zipping A Directory In Linux Terminal

Syntax zip’s syntax is: zip file1 file2 zip dir1 zip -option dir1 To zip directory called pics… Continue reading »

How to check last reboot date and time in linux servers

You can check the last reboot date and time in linux servers by using the following commands. # who -b… Continue reading »

OpenVz commands

Some of commonly used openvz commands ———————————————————— VZ Information To list all the running/stopped VPS in the node # vzlist… Continue reading »

Some useful scripts/commands

Way to check installed perl modules in the server # perl -MCPAN -e ‘CPAN::Shell->r’ way to check syntax of zone… Continue reading »

Replace using sed

How to replace a string using sed command? cd /folder/ sed -i ‘s/string_to_be_replaced/new string/g’ *           —> Without SPACES in between…. Continue reading »

VPS commands

“vzctl create 101 — ostemplate centos-5.2-default” // Create new VPS 101 with the template centos-5.2-default “vzctl set 101 — ipadd… Continue reading »