Find Files by Size

The below command is set to search the home directory of the server for files that are larger than 200M into a new text file large_files. find /home/ -xdev -type f -size +200M -exec ls -la {} \; | sort -n > large_files  

Find possible hacked files in Linux

These commands can be used to find files with matching code that could be possible hacked files. find . -type f -name ‘*.php' | xargs grep -l “eval” –color or find . -type f -name ‘*.php' | xargs grep -l “eval *(” –color...

Lock Down WordPress login.php and wp-admin Directory

Sometimes securing a site also requires you to lock it down as to who can access the admin area. Here is a modification that can be done to the .htaccess file that will lock down the wp-login.php and also the wp-admin directory to specific IP addresses. Real easy to...

Permissions Fix for public_html and Apache2 Userdir Module

Here is the script that can be used to fix the apache2 user to have access to a users public_html folder and make changes.  This issue arises sometimes when you use applications like WordPress that when adding plugins and/or themes will need to be able to modify or...