Find PHP files which are only numbers

Sometimes you need to find files which their name is completely a set of numbers.  I have found this especially useful when a site I host ‘seems’ to have been compromised by a hacker. find /home | egrep ‘^.*\/[0-9]*\.php$’ | egrep -v “\/404.php|\/PEAR\/REST” Thanks to Tim from ://Sapia for this contribution.

Common LINUX Commands

The following is a list of commonly used LINUX/UNIX commands which may be of value during your Telnet sessions. Remember that LINUX/UNIX is case sensitive. Options or flags which can be used with a command are placed in [ ]. The [ ] are not part of the command and should not be included in […]

Flush Cache on Mac Computer

Open up Terminal (Applications —> Utilities —> Terminal) and type: dscacheutil -flushcache Then press enter. Then go back to your browser (Safari, Firefox, Chrome or other) and reload the site you’re having trouble with.

SSH Command to access Linux Server

If you’re allowed SSH access to your hosting account the command via programs like Terminal (Mac) or Putty (Windows) is: ssh -l username serverIP Note: replace ‘username’ with your username and ‘serverIP’ with the IP address of your host.

Where is PHP.INI file in Linux?

Usually the PHP.INI file is located in: /usr/local/lib Note: this is the PHP.INI file for your entire server. Some web hosts will allow the usage of account specific PHP.INI files that can over-ride the servers PHP.INI settings.

Delete an entire directory via SSH

Really simple to do, but be careful!  There is no going back once you’ve performed this command. The command: rm -rf YourDirectory Explanation: rm = remove (delete) -r = recursive (all folders, sub folders and files) -f = force (no prompt) Do this at your own peril.  If you’re not sure what you’re doing… STOP!  […]