filesystem
The way an operating system organises files and folders on a disk or in memory.
In more detail
Files are named and arranged in folders, and the filesystem tracks where each file's bytes live on disk. On Unix-like systems such as Linux, everything hangs off one directory tree that starts at /, and different filesystems are mounted into it at different points.
Examples
Steps in one job share a filesystem; jobs do not.A new EBS volume is formatted and mounted before use.Twelve-factor processes may use the local filesystem only as a brief cache; uploads, sessions and compiled assets written there are lost when the process is replaced.A filesystem such as ext4 organises the blocks of a disk into files, directories, names and metadata such as inodes. On Linux every filesystem is attached somewhere in one directory tree that starts at /. Some filesystems, such as /proc and /sys, are not stored on disk at all: the kernel generates their contents on demand.Next.js Server Components in the Node.js runtime can read files; the Edge runtime has no filesystem access.NTFS is the Windows file system whose MFT and USN journal record file history.In this course: To a test the filesystem is a collaborator with state: files left behind by one test can make another pass or fail. Give each test its own temporary directory and assert the file contract: what exists, what it contains and what happens when it is missing.Related terms
- B-tree — A balanced search tree whose nodes each hold many sorted keys and have many children, so the tree is very wide and very shallow.
- disk block — The fixed-size unit, typically a few kilobytes, in which data is read from and written to disk.
- mount point — The directory where a filesystem is attached into the single directory tree.
- root filesystem — The top of the directory tree, written as a single slash, under which every other file and directory hangs.
- df — The command that reports total, used and free space for each mounted filesystem.
- runner workspace — The directory on a runner where the repository is checked out and where a job's steps work by default.
- block storage — Storage presented to one machine as a raw disk, which the operating system formats with a filesystem.
- file storage — Storage that presents shared folders and files over a network so several machines can read and write the same paths.
- stateless process — A process that keeps nothing it needs between requests in its own memory or disk, so it can be restarted or replaced at any moment.
- asset compilation — Turning source files such as stylesheets and scripts into the optimised files a web app serves.
- union filesystem — A filesystem that stacks several directories on top of each other and shows them as one.
- volume — Storage managed by Docker that lives outside any container, so data survives when the container is removed.
- block device — A storage device, such as a disk or a partition, that the kernel reads and writes in fixed-size blocks.
- inode — The record a filesystem keeps for each file, holding its owner, mode, size, timestamps, link count and the location of its data blocks, but not its name.
- ext4 — The default filesystem on many Linux distributions, a journaling filesystem that stores files in blocks tracked by inodes.
- node:fs — The built-in Node.js module for working with files and folders, in promise, callback and synchronous forms.
- Node.js built-in modules — Modules that come with Node.js itself, such as fs, path, crypto and child_process.
- read-only root filesystem — Running a container so that nothing in its root filesystem can be changed, with writable space only where you add it.
- file permissions — Rules on each file saying which user and group own it and who may read, write or run it.
- tmp_path — A built-in pytest fixture that gives each test its own fresh temporary directory as a pathlib.Path.
- pathlib — Python's standard library module for working with file paths as objects rather than plain strings.
- test isolation — The property that each test sets up everything it needs and leaves nothing behind, so tests pass in any order.
Taught in
- Working With AI Coding Assistants — AI Engineering: LLM Apps, RAG & Agents
- B-Trees: The Structure Behind Every Database Index — Algorithms & Data Structures for Working Engineers
- Which Shell Am I In, And Getting Bash Five — Bash Scripting & Command Line Automation
- Moving Around: pwd, ls, cd And Paths — Bash Scripting & Command Line Automation
- Scheduling, Monitoring And A Script That Reports — Bash Scripting & Command Line Automation
- Runners: Where Code Executes — Continuous Integration & Continuous Delivery Pipelines
- Workflows, Jobs, Steps, and Actions — Continuous Integration & Continuous Delivery Pipelines
- Persistent And Ephemeral Volumes — Certified Kubernetes Application Developer (CKAD) Exam Prep
- SecurityContexts And Capabilities — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Configuration And Security: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Minimal Base Images: Less To Attack — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Static Analysis: kubesec And KubeLinter — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Investigating An Attack: One Timeline, Two Logs — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Immutable Containers: Read-Only At Runtime — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Object, Block, and File Storage — Cloud Infrastructure & Hyperscaler Architecture
- S3: Permissions, Tiers, and Policies — Cloud Infrastructure & Hyperscaler Architecture
- Elastic Block Store (EBS) — Cloud Infrastructure & Hyperscaler Architecture
- Elastic File System (EFS) — Cloud Infrastructure & Hyperscaler Architecture
- Container Hardening: Distroless & Rootless — Cloud Security & DevSecOps Engineering
- Kubernetes Pod Security Standards: Baseline & Restricted — Cloud Security & DevSecOps Engineering
- Build, Release, Run And Processes — DevOps & Site Reliability Engineering
- Disposability, Dev Prod Parity And Logs — DevOps & Site Reliability Engineering
- Namespaces And Cgroups: Isolation And Limits — Docker Architecture & Production Containers
- Union Filesystems, Images And Writable Layers — Docker Architecture & Production Containers
- Docker, OCI, The Engine And The CLI — Docker Architecture & Production Containers
- Install Docker And Verify Your Environment — Docker Architecture & Production Containers
- Pull And Inspect A Third Party Image — Docker Architecture & Production Containers
- FROM, WORKDIR, COPY And ADD — Docker Architecture & Production Containers
- RUN, SHELL And Efficient Layer Caching — Docker Architecture & Production Containers
- Multi Stage Builds, Targets And Build Secrets — Docker Architecture & Production Containers
- Ephemeral Filesystems And Named Volumes — Docker Architecture & Production Containers
- Bind Mounts, Permissions And Backups — Docker Architecture & Production Containers
- Environment, Secret Files And Runtime Restrictions — Docker Architecture & Production Containers
- Harden And Deliver The Complete Service Stack — Docker Architecture & Production Containers
- From Local Containers To Kubernetes — Docker Architecture & Production Containers
- Arrays, Slices, and Maps — Concurrent Systems Programming with Go
- Files and the os Package — Concurrent Systems Programming with Go
- Pin It, Lint It, Prove It: Images And Runtimes — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- Five Jobs, Five Workloads — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- Not As Root, Not In Plain Sight: Pod Security And Secrets — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- Bookings That Survive The Pod: Volumes And Claims — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- How Thick Is The Wall? Isolation Techniques — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- A Pod That Mounts The Node: Runtime, Pods And Storage — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Draw The Boundaries: Trust And Data Flow — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- What Outlives The Fix: Persistence And Privilege Escalation — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- The Report That Ate The Node: Denial Of Service And Malicious Code — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Four Alerts, One Incident: Observability And The Mesh — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Troubleshooting: Probes, Logs, exec And CrashLoopBackOff — Kubernetes: Production-Grade Container Orchestration
- Volumes, PersistentVolumes And PersistentVolumeClaims — Kubernetes: Production-Grade Container Orchestration
- StorageClasses, CSI And Dynamic Provisioning — Kubernetes: Production-Grade Container Orchestration
- StatefulSets, Stable Identity And Data Recovery — Kubernetes: Production-Grade Container Orchestration
- Troubleshooting: Pending Claims And Failed Mounts — Kubernetes: Production-Grade Container Orchestration
- The Filesystem Hierarchy — Linux Fundamentals & Systems Administration
- Inodes, Hard Links And What rm Removes — Linux Fundamentals & Systems Administration
- Disks, Filesystems And Mounting — Linux Fundamentals & Systems Administration
- Running Out Of Space: df, du And Inodes — Linux Fundamentals & Systems Administration
- Server Components: Async Execution & Constraints — Next.js 15 & Modern App Router Architecture
- Full Route Cache: Static Rendering & Segment Config — Next.js 15 & Modern App Router Architecture
- Runtime Environments: Node.js vs Edge Runtime Choice — Next.js 15 & Modern App Router Architecture
- libuv Architecture: Event Demultiplexer & Thread Pool — Node.js Internals & Backend Services
- Asynchronous File I/O: node:fs/promises & Handles — Node.js Internals & Backend Services
- Directory Traversal: Recursive Readdir & fs.watch — Node.js Internals & Backend Services
- Forensics Principles, Custody & Imaging — Security Operations & Threat Hunting (SOC)
- Disk Forensics: MFT, UsnJrnl & Prefetch — Security Operations & Threat Hunting (SOC)
- Container Security: Minimal Bases And Non Root — Application Security & Threat Modeling for Engineers
- Testing The Filesystem — Automated Testing, TDD & Quality Engineering
References
- man7: filesystems(5)
- Linux kernel docs: filesystems
- Make an Amazon EBS volume available for use
- Docker storage overview
- man7: hier(7)
- Node.js docs: File system
- pytest: how to use temporary directories and files
Certification courses
- AWS AIP-C01 course and practice exam: AI engineering with LLM apps, RAG and agents
- CKAD course and practice exam: Certified Kubernetes Application Developer
- CKS course and practice exam: Certified Kubernetes Security Specialist
- KCNA course and practice exam: Kubernetes and Cloud Native Associate
- KCSA course and practice exam: Kubernetes and Cloud Native Security Associate