Operating Systems & Administration

[Day 2] 1. More about File Systems

D
DITISS Admin
••3 min read

Disk Partition Conventions

In Windows

  • Hard Disk: Disk0, Disk1, ...
  • Partitions: C:, D:, E:, ...

In Linux

  • Hard Disk: sda, sdb, sdc, ...
  • Partitions: sda1, sda2, sda3, ...

drwxr-xr-x     1    sunbeam     sunbeam      4096     Sep 26 18:54  copy.txt

| drwxr-xr-x | 1 | sunbeam | sunbeam | 4096 | Sep 26 18:54 | copy.txt | | ------------------------------------------------------------------------------------- | ---------- | ---------------------- | ------------- | --------------------- | ------------ | ---------------- | | First letter 'd' denotes the type of file. The other characters indicate permissions. | Link Count | User/Owner of the file | Group of file | Size of file in bytes | Time Stamp | name of the file |


Types of Files in Linux

  1. Regular File:
    -
  2. Directory File:
    d
  3. Link File:
    l
  4. Pipe File:
    p
    • Used for Inter-Process Communication (IPC).
    • Example commands:
      • mkfifo fifo
        : Create a pipe file named
        fifo
        .
      • ls -l fifo
        : Check the type of file.
  5. Socket File:
    s
  6. Character Special File:
    c
    • Data transfer is character by character; used by character devices.
  7. Block Special File:
    b
    • Data transfer is block by block; used by block devices.

Groups in Linux

  • Group: A collection of users with shared permissions.
    • Examples:
      • Students →
        group1
      • Staff →
        group2
      • Admins →
        group3
  • Purpose of Groups: To assign permissions efficiently across users instead of individually.

File Ownership

  • When a user creates a file, they become the owner.
  • The file is assigned to the creator’s group.
    • Example: If
      student1
      (part of
      group1
      ) creates
      file.txt
      , it belongs to
      group1
      .

File Permissions

Permission Types

  1. Read (
    r
    )
    : View the file.
  2. Write (
    w
    )
    : Modify the file.
  3. Execute (
    x
    )
    : Run the file (for scripts/programs).

Permission Categories

  • User (Owner):
    rwx
    ,
    rw-
    , etc.
  • Group:
    rwx
    ,
    r--
    , etc.
  • Others:
    rwx
    ,
    r--
    , etc.

Understanding Permissions

  • -
    means the permission is not granted.
  • Permissions follow an octal number system.

Example

  • String:
    rw- rw- r--
  • Binary:
    110 110 100
  • Octal Representation:
    • User: 6
    • Group: 6
    • Others: 4
    • Total:
      0664
      (the leading
      0
      indicates it's octal)
  • View Octal Representation: Use
    stat <filename>
    command.

Read Next

8/26/2026

[Day 2] 2. Some more commands

### File Information Using `stat` To retrieve specific information about a file, you can use the `stat` command in Linux. Here are some examples:...

8/26/2026

[Day 2] 3. Process Management

!3. ProcessManagement.png **Process**: Running an instance of a program. **Program**: A set of instructions for the machine (CPU). ### Compil...