Namespace and File naming conventions
File system
- the most visible aspect of an operating system
- provides the mechanism to store and access data and programs through
- a collection of files, each storing related data, and
- a directory structure, to organize and provide information about all the files in the system.
- live on storage devices.
- is the method that the operating system uses for organizing and storing information on the system, including processes, serial ports, and inter-process communication channels (mapped into the file system namespace)
- has four main components:
- a namespace: a way of naming things and organizing them in a hierarchy;
- an API: a set of system calls for navigating and manipulating objects;
- a security model: a scheme for protecting, hiding, and sharing things;
- an implementation: software that ties the logical model to actual hardware.
Namespace
Namespace – a way of naming things
- Namespace supports two-part file names, with the two parts separated by a period
- file extension usually indicates something about the file
- Note that space (blank) is used as delimiter to tokenize commands, therefore it is not used to name file and directory.
Namespace – a way of organizing things
The key to all operations is that the data has some kind of structure.
- Directory: a file that acts as a holder for other files and directories.
- File: a collection of data that is stored on a disk and that can be manipulated as a single unit by its name.
- Directory tree: includes a directory and all of its contents and its sub-directories.
- Parent directory: a file that contains another directory.
File naming conventions
- Do not use spaces in file and directory (folder) names
- Use short filenames (seven-nine characters) that have meaning
- Use lower case, but camel casing is OK; be consistent.
- Use alphanumeric characters only: letters and numbers
- Avoid special characters, such as * ! # $ % ^ & = + ; ,
- Use underscores or hyphens; be consistent.
- Use either .html or .htm (pick one nd stick to it, do not mix); preferred (newer) .html
- All filenames end in dot-three-letter, some dot-four-letter, extension.