How to create a file of arbitrary size
Sometimes you might need to test certain functionality of a file system, e.g. if quotas are reported correctly. For this purpose you might want to upload a file on the server in specified size. You can easily create such a file using the command below: dd if=/dev/zero of=filename bs=1024 count=1048576 if...
Types of DNS records
If you have a website and often communicate with your host’s support/sales team, I bet you’ve been told at lest once to change some records for your domain. Since not many of you are familiar with the DNS system, I will try to briefly explain some common records, which you will most likely...
Delete files older than X nuber of days
Here is another bash one-liner. This one will help you find and delete files older than X number of days. Very useful in a directory full of various types of logs, such as /var/log: find .  -type f -mtime +X -exec rm -rf {} \; ;done This assumes, that you are already in the directory in question. Simply...
How to make exim send from a new IP
If you need to send lots of e-mail addresses via your Exim MTA, you will most probably want to do so from a new IP address, so you can preserve your main one. Configuring this is as easy as 1-2-3 :) Open exim.conf for editing with your preferred text editor and find the following lines: remote_smtp: ...
remove only old files from a folder
If you have a directory full of logs for example, I am sure at some point you needed to delete all of them, but the 10 most recent ones. Here is a very short bash one-liner: rm `ls -t | awk 'NR>10'` This will remove all the files from the folder and will leave the 10 most recent ones. The command...
Find the full path to a program
Quite often, when you are installing an application on your host, it asks for the full path to a program. Galleries for example, will need the full path to the convert executable of ImageMagick, some e-commerce scripts need the full path to the curl binary, etc. Of course you can always contact your...
cPanel language
As cPanel is the most popular and widely used hosting control panel, I bet you have used it on at least one of your hosts. Since many of you are not native English speakers, the cpanel developers have added soem additional languages, which you can use, to make the job of maintaining your account a bit...
PHP function test
Most hosting companies today, which offer PHP hosting tend to disable certain PHP functions mostly for security reasons. Contacting support to check if a function is available or not can sometimes be really tough. To save you all this trouble, here is a short script, which will tell you if a function...
What is .htaccess
This is a file, which all of us, who use cPanel hosting have on our account. Most of you have probably wondered what is this and how do I use it. I will try to explain it below and provide a few usefull examples on how to use its great capabilities. What is the .htaccess? This is a part of the Apache...
301 redirect types
At some point all of us needed to add a redirect of some type to our website. Whether it will be for SEO purposes or to point ur visitors to the new website version, various types of redirects were always needed. All of them will report 301 or 302 HTTP status code to your browser, so no worries about...
Page 1 of 212»