Open main menu

CDOT Wiki β

Changes

OPS102 - Filesystem Basics

2,462 bytes added, 11 January
Volume Designators
=== Extensions ===
Many operating systems use an ''extension'' at the end of a filename to denote the type of data stored in the file. These extensions are written as delimited by a period followed by one or more characters. For example, in the filename:
ops102_project.pdf
The extension is "pdf", denoting a file in Portable Document Format.
 
It is unusual to use multiple extensions on a Windows system, but not uncommon on a Linux (or other Unix-like) system.
 
For example, on a Linux system, the filename
 
backup.tar.gz
 
has two extensions, "tar" indicating a archive created with the <code>tar</code> command, and "gz" indiciating that the file was compressed with the <code>gzip</code> command.
 
=== Case Sensitivity ===
 
Some filesystems are case-sensitive, and UPPER- and lower-case letters are considered to be different. For example, the filenames <code>MILK.PDF</code>, <code>Milk.pdf</code>, and <code>milk.pdf</code> refer to three different files. This is the case with most Linux (and Unix-like) filesystems.
 
Most Windows filesystems are not case-sensitive, so the filesnames <code>MILK.PDF</code>, <code>Milk.pdf</code>, and <code>milk.pdf</code> would refer to the same file.
== Current Directory ''or'' Working Directory ==
== Pathnames ==
A ''pathname'' is a filename that includes information about the directory in which the file is stored. (Sometime pathnames are simply called filenames!). There are three types of pathnames:
=== Absolute Pathname ===
Any pathname that does not start with a slash/backslash or a tilde character is a ''relative'' pathname, which is interpreted as starting at the current directory.
If the current directory is <code>/home/kim/ops102</code>, then the Linux pathname
presentation.pdf
/home/kim/ops102/presentation.pdf
The symbol ".." means the parent directory. Assuming the same current directory as above (<code>/home/kim/ops102</code>), the Linux pathname
../Downloads/example.txt
/home/kim/ops102/test.odt
 
Likewise, if the current directory on a Windows system was <code>\Users\kim</code>, then the pathaname
 
ops102/presentation.pdf
 
refers to the absolute pathname
 
\Users\kim\ops102\presentatin.pdf
 
And the relative pathname
 
..\Downloads\example.txt
 
refers to the absolute pathname
 
\Users\kim\Downloads\example.txt
 
Relative pathnames are often the shortest form of pathname, but the meaning of a relative pathname changes based on the current working directory.
 
== Volume Designators ==
 
On Windows systems, a volume designator consisting of a letter followed by a colon may prefix a pathname. The volume may be a partition on a disk drive (HDD or SSD), a network storage location, or a multi-drive volume, where multiple partitions or disks are combined into a single storage pool.
 
Since the original IBM PC was designed to have up to two floppy disk drives, designated A: and B:, the main/first disk drive in a Windows system is usually designated as volume C:
 
Therefore, the \Windows folder on the main/first disk drive on a Windows system may be referred to as
 
C:\Windows
 
The volume designator is case-insensitive.
 
Each unique volume on a Windows system has its own root directory and its own current working directory.
 
To switch between volumes, type the volume designator by itself:
 
C:
 
Or
 
E:
 
On a Linux system, instead of using drive designators, volumes are ''mounted'' into the filesystem hierarchy -- that is, volumes are attached as directories, creating a unified hierarchy with a single root directory.