How to Delete Files in Directory in Linux

If you want to delete files within a directory in Linux, you can use this simple command rm -f /your/directory/* If you want to delete files and directories recursively within a directory in Linux, you can use this command instead 🙂 rm -rf /your/directory/*

How to Remove Directory and Subdirectories Recursively in Linux

Sometimes there is occasion where deleting files from Cpanel takes a very long time to finish. For example because there are too many files under a directory. In this situation we can use SSH to delete a directory and all files and subdirectories under that directory. We can use the command below. But be careful,… Continue reading How to Remove Directory and Subdirectories Recursively in Linux

How to Install PECL Memcache in WHM / CentOS

You can run these commands to install PECL memcache (not memcached). However, this memcache will work with memcached. wget http://pecl.php.net/get/memcache-3.0.8.tgz tar xvfz memcache-3.0.8.tgz cd memcache-3.0.8 phpize ./configure make make install Take note of the php extensions directory that memcache is installed in. Mine is: /usr/local/lib/php/extensions/no-debug-non-zts-20020429/ Then add this line to your php.ini extension=”/usr/local/lib/php/extensions/no-debug-non-zts-20020429/memcache.so”

How to Install Litespeed in WHM

Here i will explain how to install Litespeed webserver in WHM. According to the Litespeed wiki : Open & login to your SSH terminal Execute this command to download the installer : wget http://www.litespeedtech.com/packages/cpanel/lsws_whm_autoinstaller.sh Next we will make the file executable : chmod a+x lsws_whm_autoinstaller.sh Last step we can execute this command : (please check… Continue reading How to Install Litespeed in WHM

Exporting MySQL Databases Command Line in Linux

To export a mysql database by linux command line, for example your database name is my_database, your mysql username is my_username, and your mysql password is my_password, you can use this command : mysqldump –opt –single-transaction -umy_username -pmy_password my_database > /your/path/here/export.sql Note: after “-u” and “-p”, there is NO space. 🙂