AlgoViz

Paths, inodes and open files

medium 7 min

A pathname resolves through directory entries to a filesystem object.

Inspect the evidence

Read it, run it, change a line and run it again.

Loading editor…

After log rotation, the directory listing looks small but the filesystem still reports eight extra GiB allocated. Inspect open files on that filesystem and compare inode numbers before and after rotation. A long-running writer can retain the old inode and continue appending to it. Reopening the intended file lets the old storage be reclaimed once the final reference closes.