by greg | Aug 25, 2016
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
by greg | Apr 12, 2015
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...
by greg | Dec 29, 2015
Here is the code to run a sql file within a specified database. mysql -u DB_User -p DB_Name < sql_file.sql
by greg | Apr 25, 2016
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...
by greg | Nov 4, 2015
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...