Single directory tree#
In Linux the totality of files is organized in one big directory tree starting with /
which is called the file system root. However usually the directory tree contains multiple different file systems as subtrees. These file systems are said to be mounted inside the root file system. The root of these sub file systems is called the mount point.
In the example are 4 different file systems, the mount points are:
/
/var
/var/mnt
/home
Mounted file systems
It is important to be aware of the file systems. For example, some path can be part of a mounted network file system. This makes frequent accesses very inefficient. It may even be a volatile filesystem which may be lost on reboots.
The fndmnt
or df
command can be used to find the containing file system of a file.
On a typical Linux systems there are many mounted file systems. A complete list is always stored in the file /proc/mnt
or can be showed by running mount
in a terminal.
Example
On a manged D-PHYS Linux machine the user home directories are not local on the individual machines but on a central server. This way users can access there home directories from any machine, but also this make the access much slower as all the data has to be transferred over a network. For example fndmnt Documents/notes.txt
shows this is a network file system (nfsv4
) actually located in /home/J/john
on server phd-home
.
findmnt --target Documents/notes.txt
TARGET SOURCE FSTYPE OPTIONS
/home/john phd-home:/home1/J/john nfs4 rw,relatime,sync,vers=4.2,[...]