|$ curl https://forge-ai.dev/api/markdown?path=docs/os/filesystems
$cat docs/file-systems.md
updated Recently·22 min read·published

File Systems

OSFile SystemsStorageIntermediate🎯Free Tools
Introduction

File systems organize how data is stored, named, and retrieved on persistent storage. They sit between the operating system and the raw blocks on a disk.

Files & Inodes

A file name is just a human-readable pointer to an inode. The inode stores metadata: size, ownership, permissions, timestamps, and pointers to data blocks.

inode.sh
Bash
1# Show inode number
2ls -i file.txt
3
4# Inspect inode details
5stat file.txt
Journaling & Crash Safety

Journaling file systems like ext4 and NTFS record pending changes in a journal before applying them. If power is lost, the system can replay the journal and restore consistency quickly.

info

Copy-on-write file systems like Btrfs and ZFS take snapshots by referencing unchanged blocks, making backups fast and space-efficient.
Permissions & Access Control

File systems enforce access rules based on users, groups, and ACLs. See the Linux permissions guide for practical commands.

Mounts & VFS

The Virtual File System (VFS) layer gives Linux a uniform interface for many file systems. Mounting attaches a file system to a directory in the global tree.

mounts.sh
Bash
1mount
2findmnt
3sudo mount /dev/sdb1 /mnt/backup
Common File Systems
FSTypical Use
ext4Default Linux file system
XFSLarge files and high throughput
BtrfsSnapshots, RAID, advanced features
ZFSEnterprise storage, checksums
NTFSWindows default
APFSmacOS default