Archive for March, 2009
I had a need for several files of various sizes to do some network testing with. I found a very good us for dd here.
dd if=/dev/zero of=10mb-file.bin bs=1024k count=n
Using the above command (and replacing n for a value) allows the creation of empty files with the size specificed. Need a 10Mb file, n = 10. Need a 100Mb file… n = 100. You get the idea.
This is a pretty simple use of mod_rewrite to force the use www in your urls.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule .? http://www.example.com%{REQUEST_URI} [R=301,L]\
The first line is only needed if mod_rewrite isn’t enabled on your server (though the module does need to be enabled). Replace example.com with your actual domain name of course.
