File System and Storage Management
Subject: Introduction To Windows And Linux Operating System (VU-CYB 201)
A file is a digital document stored on a computer. It may be a text document, picture, video, music, or software. A folder (or directory) is a container that helps organize multiple files.
Why File Organization Is Important
• Helps you quickly locate assignments, projects, or documents.
• Prevents losing important work.
• Saves time when searching for files.
• Makes backups easier.
• Reduces clutter on your computer.
Common File Types
•
Documents: .docx, .pdf, .txt
•
Images: .jpg, .png
•
Videos: .mp4, .avi
•
Compressed files: .zip, .rar
•
Executables: .exe (Windows apps)
Best Practices for Organizing Files
• Use clear and meaningful names: for example "Math_Assignment_Week2.docx" and not "Document1.docx"
• Group related files into folders: for example “School Projects”, “Photos”, “Music”.
• Use subfolders:
Documents/
— Vision University/
— Year1/
— Year2/
• Avoid unnecessary duplicates.
• Delete unused or junk files regularly.
Practical
1. Open File Explorer on your laptop.
2. Click on Documents.
3. Right‑click and select New > Folder.
4. Name the folder "Vision University".
5. Open the folder and create another folder named "200 Level".
6. Right-click inside the folder > New > Text Document.
7. Name it notes.txt.
8. Type your notes and save the file.
#Python code
import os
# Create a folder
os.makedirs("C:/Example/School/Week5", exist_ok=True)
# Create a file inside the folder
with open("C:/Example/School/Week5/notes.txt", "w") as f:
f.write("This is my Week 5 note.")
print("Folder and file created successfully!")
File Systems: NTFS vs FAT32 vs exFAT
A file system is a method used by an operating system to store, organize, and retrieve files on a device.
a. NTFS (New Technology File System)
• Default file system for Windows computers.
• Supports very large files (over 4GB).
• Supports file permissions.
• Includes file encryption and compression.
• Used in internal drives (C:, D:).
When to Use NTFS
• Laptop/desktop main drive.
• When you need security and permissions.
• For modern Windows systems.
b. FAT32 (File Allocation Table 32)
• Older file system.
• Supported by almost all devices (TVs, radios, game consoles).
• Maximum file size = 4GB
• Maximum partition size = 2TB
Limitations
• Cannot store single files larger than 4GB.
• Less secure than NTFS.
c. exFAT (Extended File Allocation Table)
• Designed for removable storage.
• Supports very large files.
• Works on Windows, macOS, and cameras.
When to Use exFAT
• Flash drives
• External hard drives
• SD cards for cameras or phones
Practical
1. Open File Explorer > This PC
2. Right-click on your C: drive.
3. Select Properties.
4. Look at the information beside File System.
5. You’ll see something like NTFS, FAT32, or exFAT.
#Python code
import os
import ctypes
path = "C:/"
fs_name = ctypes.create_unicode_buffer(255)
ctypes.windll.kernel32.GetVolumeInformationW(path, None, 0, None, None, None, fs_name, 255)
print(f"File System on {path}: {fs_name.value}")
3. File Attributes and Permissions
File Attributes
These are properties that control how files behave:
1. Read-only: Cannot be edited or overwritten.
2. Hidden: Doesn’t appear unless “Show hidden files” is enabled.
3. System: Critical files used by Windows.
NTFS File Permissions
Used mainly in NTFS drives:
• Read – View content.
• Write – Edit or add files.
• Modify – Edit, rename, delete.
• Full Control – All permissions.
For example In a school ICT lab:
• Students may have read-only access to the C: drive
• The admin has full control
This prevents accidental deletion of system files.
Practical
1. Locate your file (e.g., notes.txt).
2. Right‑click the file.
3. Select Properties.
4. Under the General tab, tick Read‑only.
3. Click Apply > OK.
Try editing it—you won’t be able to save changes.
#python code
import os
import stat
file_path = "C:/Example/School/Week5/notes.txt"
os.chmod(file_path, stat.S_IREAD) # Set to read-only
#os.chmod(file_path, stat.S_IWRITE) # Grants write permission
print("File set to read-only.")
4. Storage Devices and Partitions
Types of Storage Devices
•
HDD (Hard Disk Drive): Magnetic storage, slower but cheaper.
•
SSD (Solid State Drive): Faster, no moving parts, more expensive.
•
USB Flash Drive: Portable storage.
•
Memory Card (SD/TF): Used in phones, cameras.
By:
Vision University
Login to comment or ask question on this topic
Previous Topic