Find and delete all files containing a specific word

If you’re like me, you can accumulate thousands of files on your computer (duplicates, renamed or whatever) … keeping track, managing, deleting can become a nightmare. If you have a Linux based computer you can easily manage your files using SSH. So here’s the solution to find and delete all files containing a specific word within the […]

Secure Web Hosting

Like all web hosting companies, DISKMANdotNet are always striving to give as much access to the ‘good people’ out there and at the same time keep all the bad ones out.  Hackers, spammers and general ‘no good’ doers are always trying to infiltrate web hosting servers all around the world.  Web Hosting in Melbourne is no […]

Search & Replace in MySQL (PHPMyAdmin)

Ever needed to search and replace text, URL’s or other data within a MySQL database?  Well it’s pretty easy.  Just be careful.  Make sure of everything before you commit. Step 1, log in to your cPanel (or direct into PHPMyAdmin) and select your database Step 2, Use the following syntax in the SQL area. Step […]

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 […]

Monitor Inbound Email (CentOs)

Firstly log into your server via SSH and type the following command: tail -f /var/log/exim_mainlog To cancel the monitoring press CTRL & Z.

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!  […]