Directories Flashcards
What is the problem with duplicating file information when shared files are required?
It is difficult to maintain consistency if either file is modified. Only suitable for read-only files
What is the difference between a hard link and a soft link?
Hard links point to the actual file inode or FCB. Soft links just point to another hard link.
What happens when the file pointed to by a symbolic link is deleted?
The soft link points to nothing. Errors are generated when trying to open it. Think shortcuts in Windows OS.
What happens when hard links are deleted?
The file reference count in the file inode is decremented. If it was the last hard link, then the entire file is deleted.
What is a single-level directory?
All files are kept in the same space
What are problems with single-level directory?
Unique filenames. Large number of files difficult to search, or organise.
What is a multi-level directory structure?
Each user gets their own User File Directory (UFD) which are located in the Master File Directory (MFD)
Benefit with UFDs?
Users can have duplicate filenames between each other.
Still no sharing, or subdirectories.
Why doesn’t UNIX allow directory hard links?
They will introduce cycles in file system tree, causing infinite recursion during traversal.
UNIX only allows symbolic links to directories.