File: A logical unit of related data, stored as a bundle in secondary memory
Directory: fundemantaly directory is a special type of file that stores metadata about other files. It stores this in a table format.
Directory Entry: entry of the table that includes file name and its location in hard dist etc.

File System: a component of the OS that manages how files and directories are stored, retrieved, and organized on secondary storage
🧱 How the File System Works
📦 How Data is Stored
Contiguous allocation
: Like a linked list with a directory table
: Simple and fast, but suffers from external fragmentation
Indexed allocation
: Each file has a dedicated index block that stores the addresses of all its data blocks
: Enables fast random access by using the index to look up any block directly

FAT(File Allocation Table) File System
: Uses a table that stores (current block → next block) pairs
: The FAT is located at the beginning of the partition
: Even though it's a form of linked allocation, it can be cached in memory, making lookup fast
ex) /home/mincul/a.sh file look up meachnism in FAT system


Unix File System
: Uses i-nodes (index nodes) to store:



Mount
: Merge one file system to another file system
ex) Use USB connecting to a computer
