---
title: "Short note: UNIX file system"
subject: "Operating System"
chapter: 5
key: "semester_6/operating_system:unix-file-system-note"
source: https://www.bctengineer.com/q/semester_6/operating_system/unix-file-system-note
site: BCT Engineering
---

# Short note: UNIX file system

Operating System · Chapter 5: File Systems

- Asked in: 2073 Bhadra, 3.5 marks
- Video: [UNIX File system organization basics for beginners](https://www.youtube.com/watch?v=PEmi550E7zw) — Computer Programming University
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/operating_system/unix-file-system-note
- Whole chapter: https://www.bctengineer.com/md/semester_6/operating_system/chapter-5

## Question

Write a short note on UNIX file system.

## Short answer

UNIX uses a hierarchical tree with a single root, where everything is a file (regular, directory, device). I-nodes hold metadata and block pointers (direct, indirect). Features: mounting to unify trees, hard and symbolic links, 9‑bit permissions, and buffer cache.

## Answer

The **UNIX file system** is a hierarchical, tree-structured file system with a single root `/`. Everything is a file: ordinary files, directories and special (device) files, so the same system calls (open, read, write, close) are used for files and I/O devices.

Main features:
- **Hierarchical directories:** a directory is a file containing (name, i-node number) entries; path names can be absolute (`/usr/bin/ls`) or relative; `.` and `..` refer to the current and parent directory.
- **I-nodes:** each file has an i-node with attributes and block addresses (10 direct, single, double and triple indirect pointers), so large files are supported and access is efficient.
- **Disk layout:** boot block, superblock, i-node list, data blocks.
- **Mounting:** other file systems are attached to a directory with `mount`, giving one unified tree.
- **Links:** hard links (several names for one i-node) and symbolic links.
- **Protection:** 9 permission bits (read, write, execute for owner, group, others), plus the set-UID, set-GID and sticky bits.
- **File types:** regular, directory, character special, block special, pipe/FIFO, socket.
- A **buffer cache** is used for performance, and free blocks are managed by a free list or bit map.

```text
          /
   +------+------+
  bin    usr    dev
   |      |      |
  ls   +--+--+  tty0
      bin  lib
```

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What does a UNIX i-node hold?
   A. File attributes and block addresses (10 direct plus single, double, triple indirect pointers)
   B. Only the file name and path
   C. The file data itself
   D. Only the permission bits
   Answer: A. The i-node stores attributes and block addresses; names are kept in directory entries. (Key point: I-node contents)

2. What does a UNIX directory entry contain?
   A. A file name and its data blocks
   B. A file name and an i-node number
   C. Only the owner and permissions
   D. A file name and its disk cylinder
   Answer: B. A directory is a file of (name, i-node number) entries. (Key point: Directory entry)

3. What does the mount command do?
   A. Creates a hard link to a file
   B. Formats the disk
   C. Attaches another file system to a directory to form one unified tree
   D. Changes file permissions
   Answer: C. Mounting attaches a file system at a directory so there is a single tree under /. (Key point: Mounting)

4. What does 'everything is a file' mean in UNIX?
   A. Devices cannot be accessed by programs
   B. Only ordinary files have i-nodes
   C. Directories cannot be opened
   D. Ordinary files, directories and devices use the same system calls like open, read, write, close
   Answer: D. Special device files let I/O devices be handled with the same calls as files. (Key point: Everything is a file)

## Related in Operating System

- [File system layout, i-node, backup](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layout-inode-backup) — Operating System, chapter 5
- [File system layout; i-node vs linked list](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layout-inode-vs-linked-list) — Operating System, chapter 5
- [Linked list file system; block size impact](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-linked-list-block-size) — Operating System, chapter 5
- [File system layout; interface vs implementation](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layout-interface-vs-implementation) — Operating System, chapter 5
- [File system layout; free block management](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layout-free-blocks) — Operating System, chapter 5
- [File system layers; linked list vs index](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layers-linked-list-vs-index) — Operating System, chapter 5

## Related in other subjects

- [Google File System architecture](https://www.bctengineer.com/question.md?key=semester_8%2Fbig_data_technologies%3Agfs-architecture) — Big Data Technologies, chapter 2, asked 2×
- [File system handling of kernel](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Akernel-file-system-handling) — Embedded System, chapter 6
- [File size: 60 s, 44.1 KHz, 8-bit stereo](https://www.bctengineer.com/question.md?key=semester_8%2Fmultimedia_system%3Aaudio-size-60s-44khz-8bit) — Multimedia System, chapter 2, asked 3×
- [File size: 30 s, 44.1 KHz, 8-bit stereo](https://www.bctengineer.com/question.md?key=semester_8%2Fmultimedia_system%3Aaudio-size-30s-44khz-8bit) — Multimedia System, chapter 2, asked 3×
