Web Development Tutorials
//

Tag: Command Line

Server Administration

Deploy a Site With rsync

Deploy a site with rsync and every update becomes one repeatable command that copies only what changed. This tutorial covers -avz over SSH, --exclude…

August 17, 2026

Server Administration

Add a Swap File to a Small Server

Add a swap file to a small server and a memory spike stops killing your processes. fallocate reserves the file, mkswap formats it, swapon…

August 17, 2026

Programming

List Files in a Directory With PHP

Inventory a folder with PHP: match a pattern with glob(), read every entry with scandir(), walk sub-folders with RecursiveDirectoryIterator, then sort by size or…

August 13, 2026

Database Administration

Export MySQL Query Results to a CSV File

SELECT ... INTO OUTFILE turns any query into a spreadsheet file, written by the server itself. Handle the quoting that keeps embedded commas safe,…

August 13, 2026

Server Administration

Rotate Logs With logrotate

A log file that grows forever will eventually fill the disk. Write a logrotate config that renames, compresses and expires old copies, test it…

August 12, 2026