We consider file name as “ishan.txt” !/bin/bash if [ -e $1/ishan.txt ]; then echo “file is present” else cp -r ishan.txt $1 fi sh script.sh /path to the folder
cPanel
How to check the PHP version of domains in cPanel
Please use the below command to get the information about PHP version of individual domains hosted in cPanel. [arunlal@lintechops ]# for i in awk ‘{print $2}’ /etc/trueuserdomains; do cd /home/$i/public_html ; echo $i – php -v| grep ^PHP | awk…
500 Internal Server Error in WordPress
We experiencing the 500 Error with WordPress sites mainly access themes/plugins in the wp-admin dashboard. This is mainly due to the issue with Memory Limit of WordPress. Adding the following line in the wp-config.php will resolve the issue. define(‘WP_MEMORY_LIMIT’, ’64M’);Just…
How to calculate MySQL max_connections
max_connections = (Available RAM – Global Buffers) / Thread Buffers For getting the available RAM in bytes. free -b total used free shared buff/cache available Mem: 8253255680 6625886208 172158976 931852288 1455210496 409915392 For getting the details about Global buffers, access…
How to calculate MySQL thread_cache_size
This parameter sets the amount of thread for cache purposes. If client disconnects, his thread are kept in the cache. If the requests are less than the thread_cache_size then threads that are stored in cache will serve the requests. To…
Script for wordpress version with user information
Kindly download the following script and execute the script using the following command. [root@arunlal ~]# wget lintechops.com/wp-version.sh[root@arunlal ~]# sh wp-version.sh Output be like. abxxxcd ‘4.4.18’; abxxxdc ‘4.9.10’; abxxxfg ‘4.0.26’; abxxxtr ‘3.9.27’; acxxxje ‘4.0.26’; apxxxit ‘3.8.5’;
Command for finding disk usage of error_logs in the home directory
It’s really a headache while handling disk space issues with Linux server. Today I am sharing one of the easiest commands to sort out the size of unwanted logs that can be easily removed from the server to tackle the…
VIRTFS consuming a lot of space ( cPanel )
cPanel & WHM uses VirtFS to provide a jailed shell environment for users who connect to a server via SSH. The jailed shell acts as a container for the user and does not allow the user to access other users’…
Maldet Installation
Run the following command in the Linux terminal. It will install the latest version of maldet in the server. ==================== root@testserver [~]# cd /usr/local/src/ && wget http://www.rfxn.com/downloads/maldetect-current.tar.gz && tar -xzvf maldetect-current.tar.gz && cd maldetect-* && sh install.sh ====================
Imunify poor protection status Error in cPanel
While getting the poor protection status error followed by the following warning “No events from ModSecurity for X days“ Please check the Apache error log for Mod Security error. ——– grep ModSec /usr/local/apache/logs/error_log ——– If the output of the Error…