From the terminal (SSH): grep -Ril "find /home/username/public_html/ -type f -mtime -2" From a .php file: <?php $last=shell_exec('grep -Ril "find /home/username/public_html/ -type f -mtime -2"'); echo "<pre>$last</pre>"; ?> The...
Check the following log files:
To check if the files were deleted using FTP
/var/log/messages
To check if the files were deleted using file manager
/usr/local/cpanel/logs/error_log
If the files were deleted using shell access
history
Lately I’ve been dealing a lot with email accounts in cPanel: Bulk change cPanel mailbox quota for all email ✉️ accounts and Bulk delete ✉️ email forwarders in cPanel. Here is how to bulk create email accounts in...
This one-liner will help to find all WordPress installations running a specific version, where the current latest is 5.6 locate wp-includes/version.php | xargs grep "wp_version = " | grep -v " = '5-6'" A more efficient shell script that will scan...
Is your website loading slowly? Redirects? Popups? Can’t login? Strange folders? Files with weird names? Huge number of failed/deferred emails that you didn’t even send? These are just some of the most common symptoms of a hacked...
Here is how to check MySQL databases for malware: Open up PHPMyAdminLook for anything ‘weird’ It’s that simple. What’s ‘weird’ you ask? Well, anything that’s ‘not supposed to be in the database’...
How to paste Print Screen on MS Paint automatically when press “PrtSc” button? If you use Windows you are used to pressing the PrtSc button and then opening the MS Paint and then paste (Ctrl + V) the screenshot. But what if there was a...
It means to kill job number 1, not process number one. $ kill %1 Jobs can be listed with the jobs command. More broadly, it relates to whichever shell you are using, and the syntax could differ from shell to shell...
A few weeks ago I was approached by a friend of mine, complaining about high load and CPU usage on one of his shared hosting servers (DELL) running CentOS 7, CloudLinux and cPanel. I was more than happy to take a look, and after a couple of minutes...
Installing the Linux operating system is only the first step toward creating a fully functional departmental server or Web site. Almost all computers are now networked in some way to other devices therefore a basic understanding of networking and...