TECH / ARCHIVE

Servers & Websites

TECH / Servers & Websites 3 min

How to Create a File of a Specific Size in Linux (fallocate, truncate & dd)

On Linux, you often need to generate a test file of an exact size – say 100 MB or 3 GB – to benchmark network transfer speeds, test disk quotas, create a disk image, or allocate a swap file. Here are the three best commands, how they differ, and why the old dd seek=3G trick sometimes surprises people.

Creating a file of a specific size in the Linux terminal

Quick answer: the fastest reliable command on modern Linux (ext4, XFS) is fallocate -l 3G /tmp/testfile – it reserves real disk blocks in a fraction of a second.

Read full article →

TECH / Servers & Websites 2 min

Ping a Website from Around the World — 5 Free Availability Check Services

You often need to ping a website from different parts of the world: to find connectivity problems with the provider where the server sits, to check response times, or to see how fast a page loads from different cities and countries.

Ping a website from different locations around the world

If you just want to see whether a site opens from, say, the US, a proxy or VPN will do. But to quickly check whether a site is reachable from 5, 10 or 20 countries, the services below come in handy.
Read full article →

TECH / Servers & Websites 2 min

How to Strip Comments and Blank Lines from .conf Files in Linux

Reading massive default config files like squid.conf or php.ini can be exhausting: 90% of the file is inline documentation and commented examples, hiding the ten active lines you actually care about. One grep command cuts straight through the noise and shows only live directives.

Stripping comments from a Linux .conf configuration file

Always back up the original file before trimming it – those commented examples are priceless later when you want to check default parameter names.

Read full article →