file systems files directories Flashcards
https://www.francogarcia.com/en/blog/file-systems-files-folders-and-paths/
What is an absolute path?
A unique path that starts from the root of a file system and ends at the chosen destination (file or directory).
How do absolute paths differ between Windows and Unix-based systems?
- Windows: Starts with a drive letter (e.g., C:). Uses backslashes ().
- Unix: Starts with a forward slash (/). Uses forward slashes (/).
What is the root of a file system in Windows?
The root is a drive letter followed by a colon and backslash, such as C:.
What is the root of a file system in Unix-based systems?
It is represented by a single forward slash (/).
How does Windows handle case sensitivity in file paths?
Windows is not case-sensitive. For example, abc.txt and ABC.TXT refer to the same file.
How does Unix handle case sensitivity in file paths?
Unix-based systems are case-sensitive. For example, abc.txt and ABC.TXT are different files.
Why do Windows paths use backslashes?
Backslashes are inherited from DOS, where forward slashes were used for command-line parameters.
What is a tilde (~) in Unix-based systems?
A shorthand for the current user’s home directory.
Why is it recommended to avoid spaces and special characters in file names?
To minimise problems with command-line tools and programming libraries that assume simpler naming conventions.
What is a relative path?
A path that starts from an arbitrary origin instead of the root of the file system.
What does the dot (.) represent in relative paths?
The current directory.
What do two dots (..) represent in relative paths?
The parent directory of the current directory.
How do relative paths differ from absolute paths?
Relative paths depend on the current working directory, while absolute paths do not.
What is the working directory?
The directory currently assumed as the origin for relative paths.
How can you retrieve the working directory on Unix?
By using the $PWD environment variable.