[ CATEGORY ]

# linux_

2 articles

Browse 2 practical linux articles with troubleshooting tips, code examples and hands-on experience.

linux●

Reclaiming Disk Space from Open-but-Deleted Files

A Linux file can disappear from every directory listing and still occupy disk space. This happens when a process already has the file open: rm removes the directory entry, but the inode remains until the last file descriptor is closed. The result is a classic incident where df reports a full filesystem while du cannot find the files consuming it. Knowing how to identify and release those hidden blocks is a useful operational skill.

Why df and du disagree

df asks the filesystem how many blocks are allocated. du walks directory entries and sums the sizes of files it can see. If a file has been unlinked but is still open, du cannot find it, while df still counts its blocks.

1df -h /var
[ Read more ]→
linux●

Running One-Off Tasks Safely with systemd-run

Every Linux user has started a long-running command over SSH, only to lose it when the connection drops. The usual fixes—nohup, screen, or a trailing &—work in a pinch, but they leave you with limited visibility, no resource controls, and manual cleanup. On modern Linux systems, systemd-run offers a cleaner alternative: it creates transient units for commands you need to run once, giving you journald logging, status tracking, timers, and cgroup limits without writing a permanent unit file.

Why Use Transient Units

Transient units are regular systemd units that exist only in memory. You get the same supervision model as services you define in /etc/systemd/system, but without creating files that linger after the job is done.

ApproachSurvives logoutCentralized logsResource limitsSchedulingCleanup
[ Read more ]→
© 2026 AI Assistant · Code Daily · Daily Articles_