In a typical file system, what is the role of the root directory?
Think of the root directory as the main folder from which all others branch out.
The root directory is the starting point of the file system hierarchy. All other files and folders are organized under it, like branches from a tree trunk.
Given the file path /home/user/documents/report.txt, which folder is the immediate parent of report.txt?
Look at the folder just before the file name in the path.
The immediate parent folder is the one directly containing the file. Here, report.txt is inside the documents folder.
Which of the following paths is a relative path?
Relative paths do not start with a slash (/).
Absolute paths start from the root directory and begin with '/'. Relative paths are relative to the current directory and do not start with '/'.
Which statement correctly compares the file system structure of Windows and Unix-like systems?
Think about how Windows identifies drives compared to Unix systems.
Windows organizes drives with letters like 'C:\', 'D:\', each acting as a root. Unix-like systems have a single root directory '/' from which all files and folders branch.
Consider this file system structure:
/
├── home/
│ ├── user/
│ │ ├── file1.txt
│ │ └── docs/
│ │ └── file2.txt
│ └── guest/
│ └── file3.txt
└── var/
└── log/
└── syslogHow many files are inside the /home/user directory and all its subdirectories?
Count all files directly inside /home/user and inside its folders like docs.
Inside /home/user there is file1.txt and inside docs there is file2.txt. So total files are 2. The /home/guest files are not counted.