File System - Path

Undraw File Manager Re Ms29


URI - Path in a file system.

A file is identified by its path through the file system.


A file path is a hierarchical URI



  • scheme is the scheme that represents the file system such as:
    • file (default)
    • sftp
  • The What is a URI (Uniform resource identifier)? represents the connection information (host, user) such as:
    • localhost (default)
    • user/password@host:port
  • The path represents the file system path and locate the file

Operating System

Os Root Node Directory Delimiter
in the
Path Delimiter
in the
Windows Path maps to a volume, such as C:\ or D:\ back slashes semicolon (;)
Unix/Linux A single root node is supported, which is denoted by the slash character, /. forward slashes colon


  • Unix

  • Windows

relative file paths are much more portable.


  • DOS descended file systems are case insensitive
  • Windows pretends that all file extensions with four or more letters are also three letter extensions (try DELETE *.jav in your java directories to see a disastrous example of this).


The character used to separate the directory names (also called the delimiter) is specific to the file system.

Unix paths use forward slashes between directories.


Relative or Absolute

A path is either:

The difference is that an absolute path begins with a prefix (root) while an relative path does not.


An abstract pathname has two components:

  • An optional system-dependent prefix string
  • A sequence of zero or more string names.

The first name in an abstract pathname may be:

  • a directory name
  • or a hostname (in the case of Microsoft Windows UNC pathnames),

Each subsequent name in an abstract pathname denotes a directory; the last name may denote either a directory or a file.

A pathname, whether abstract or in string form, may be either absolute or relative.


The canonical path is both an absolute and unique representation of a file in a file system.

The precise definition of canonical form is system-dependent.

A canonical method first converts the pathname to absolute form if necessary and then maps it to its unique form in a system-dependent way. This typically involves:

  • removing redundant names such as “.” and “..” from the pathname,
  • resolving symbolic links (on UNIX platforms),
  • and converting drive letters to a standard case (on Microsoft Windows platforms).


The prefix concept is used to handle:

  • root directories on UNIX platforms,
  • and drive specifiers, root directories and UNC pathnames on Microsoft Windows platforms




resolve is an operation that will execute (in a change directory way) all its argument in a serial way to create a path


join('/b','/c') = '/c'

More File System - Resolve (Path Resolving)


join is an operation that will join all its argument to create a path


join('/b','/c') = '/b/c'


oracle: The second element of a path. See Oracle Database - SQL - Regular expression

REGEXP_REPLACE(path, '(/[^/]+)/([^/]+)(.*)','\2') 

Documentation / Reference

Discover More
Os Path Ant Home Windows
Ant - Installation (Windows based)

Installation of Ant JDK installed on your system, version 1.8 or later Download the latest binary Uncompress the binary in a directory called the...
Bash Liste Des Attaques Ovh
Bash - (Builtin|Intern|System|Reserved|Shell) variable name

Reserved variable name are named that have a special meaning for the bash shell. PS1 defines the shell's command-line prompt. HOME defines the home directory for a user. PATH defines a list...
Bash Liste Des Attaques Ovh
Bash - Path

This article is the path management in bash. ie /dir/childDir/fileName. See also:
Bash Liste Des Attaques Ovh
Bash - Script

This page is Os Shell scripts (with a accent on the Bash shell) A Bash or Shell Script is a text file that: has a shebang has the executable permission. File extensions are meaningless in UNIX,...
Bash Liste Des Attaques Ovh
Bash - pathname expansion (Filename expansion)

pathname or filename expansion is an expansion (code replacement at runtime) that replaces globbing wildcard by pathname. pathfile name The asterisk character matches every filename in a given...
Undraw File Manager Re Ms29
File (System, Transfer, Storage)

This section is based on the File data structure. A file is: a logical grouping of related data (at the cluster size) identified through a path managed through a file system transferred through...
Undraw File Manager Re Ms29
File - BaseName

A file / directory is located by its path. The base name is the last part of the path (ie the file name and its extension if any) With the copy and move file operation, the basename does not change by...
Undraw File Manager Re Ms29
File - Change Directory (cd)

Cd is a function or utility that changes the current directory (working directory). bash dos This function implements the resolve function with the first argument being the absolute...
Undraw File Manager Re Ms29
File - Extension

The file extension is the last three characters at the end of the file path (ie therefore at the end of the file name). It describes the structure of the content. On application that may open files such...
Undraw File Manager Re Ms29
File - File

A file is a logical representation of multiple block that can be accessed and manipulated at once by a program. Generally, a file is stored in a durable in the sense that it remains available for programs...

Share this page:
Follow us:
Task Runner