/usr/share/doc/sysadmin-guide/html/fs-background.html is in sysadmin-guide 0.9-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Background</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Linux System Administrators Guide"
HREF="index.html"><LINK
REL="UP"
TITLE="Overview of the Directory Tree"
HREF="dir-tree-overview.html"><LINK
REL="PREVIOUS"
TITLE="Overview of the Directory Tree"
HREF="dir-tree-overview.html"><LINK
REL="NEXT"
TITLE="The root filesystem"
HREF="root-fs.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux System Administrators Guide: </TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="dir-tree-overview.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 3. Overview of the Directory Tree</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="root-fs.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="FS-BACKGROUND"
></A
>3.1. Background</H1
><P
>This chapter is loosely based on the <I
CLASS="CITETITLE"
>Filesystems
Hierarchy Standard</I
> (FHS).
version 2.1, which attempts to
set a standard for how the directory tree in a Linux
system is organized. Such a standard has the advantage that it will
be easier to write or port software for Linux, and to administer
Linux machines, since everything should be in standardized places.
There is no authority behind the standard that forces anyone to
comply with it, but it has gained the support of many Linux
distributions. It is not a good idea to break with the FHS without
very compelling reasons. The FHS attempts to follow Unix tradition
and current trends, making Linux systems familiar to those with
experience with other Unix systems, and vice versa.</P
><P
>This chapter is not as detailed as the FHS. A system
administrator should also read the full FHS for a complete
understanding.</P
><P
>This chapter does not explain all files in detail. The
intention is not to describe every file, but to give an overview of
the system from a filesystem point of view. Further information on
each file is available elsewhere in this manual or in the Linux
manual pages.</P
><P
>The full directory tree is intended to be breakable into
smaller parts, each capable of being on its own disk or partition,
to accommodate to disk size limits and to ease backup and other
system administration tasks. The major parts are the root
(<TT
CLASS="FILENAME"
>/</TT
>
),
<TT
CLASS="FILENAME"
>/usr</TT
>
,
<TT
CLASS="FILENAME"
>/var</TT
>
, and
<TT
CLASS="FILENAME"
>/home</TT
>
filesystems
(see <A
HREF="fs-background.html#FSTREE"
>Figure 3-1</A
>). Each part has a
different purpose. The directory tree has been designed so that it
works well in a network of Linux machines which may share some parts
of the filesystems over a read-only device (e.g., a CD-ROM), or over
the network with NFS.</P
><DIV
CLASS="FIGURE"
><A
NAME="FSTREE"
></A
><P
><B
>Figure 3-1. Parts of a Unix
directory tree. Dashed lines indicate partition
limits.</B
></P
><P
><IMG
SRC="fstree.png"></P
></DIV
><P
>The roles of the different parts of the directory tree are
described below.
<P
></P
><UL
><LI
><P
>The root filesystem
is specific for
each machine (it is generally stored on a local disk,
although it could be a ramdisk or network drive as well) and
contains the files that are necessary for booting the system
up, and to bring it up to such a state that the other
filesystems may be mounted. The contents of the root
filesystem will therefore be sufficient for the single user
state. It will also contain tools for fixing a broken
system, and for recovering lost files
from backups.</P
></LI
><LI
><P
> The <TT
CLASS="FILENAME"
>/usr</TT
>
filesystem
contains all commands, libraries, manual pages, and other
unchanging files needed during normal operation. No files in
<TT
CLASS="FILENAME"
>/usr</TT
> should be specific for any given
machine, nor should they be modified during normal use. This
allows the files to be shared over the network, which can be
cost-effective since it saves disk space (there can easily
be hundreds of megabytes, increasingly multiple gigabytes in
<TT
CLASS="FILENAME"
>/usr</TT
>). It can make administration
easier (only the master <TT
CLASS="FILENAME"
>/usr</TT
> needs to
be changed when updating an application, not each machine
separately) to have /usr network mounted. Even if the
filesystem is on a local disk, it could be mounted
read-only, to lessen the chance of filesystem corruption
during a crash.</P
></LI
><LI
><P
>The <TT
CLASS="FILENAME"
>/var</TT
>
filesystem contains files that change, such as spool
directories (for mail, news, printers, etc), log files,
formatted manual pages, and temporary files. Traditionally
everything in <TT
CLASS="FILENAME"
>/var</TT
> has been somewhere
below <TT
CLASS="FILENAME"
>/usr</TT
>
, but that made it
impossible to mount <TT
CLASS="FILENAME"
>/usr</TT
> read-only.
</P
><P
></P
></LI
><LI
><P
> The <TT
CLASS="FILENAME"
>/home</TT
>
filesystem contains the users' home directories, i.e., all
the real data on the system. Separating home directories to
their own directory tree or filesystem makes backups easier;
the other parts often do not have to be backed up, or at
least not as often as they seldom change. A big
<TT
CLASS="FILENAME"
>/home</TT
> might have to be broken across
several filesystems, which requires adding an extra naming
level below <TT
CLASS="FILENAME"
>/home</TT
>, for example
<TT
CLASS="FILENAME"
>/home/students</TT
> and
<TT
CLASS="FILENAME"
>/home/staff</TT
>.</P
></LI
></UL
> </P
><P
>Although the different parts have been called filesystems
above, there is no requirement that they actually be on separate
filesystems. They could easily be kept in a single one if the
system is a small single-user system and the user wants to keep
things simple. The directory tree might also be divided into
filesystems differently, depending on how large the disks are, and
how space is allocated for various purposes. The important part,
though, is that all the standard <EM
>names</EM
> work;
even if, say, <TT
CLASS="FILENAME"
>/var</TT
>
and
<TT
CLASS="FILENAME"
>/usr</TT
>
are actually on the same partition, the names
<TT
CLASS="FILENAME"
>/usr/lib/libc.a</TT
> and
<TT
CLASS="FILENAME"
>/var/log/messages</TT
> must work, for example by
moving files below <TT
CLASS="FILENAME"
>/var</TT
> into
<TT
CLASS="FILENAME"
>/usr/var</TT
>, and making <TT
CLASS="FILENAME"
>/var</TT
>
a symlink to
<TT
CLASS="FILENAME"
>/usr/var</TT
>.</P
><P
>The Unix filesystem structure groups files according to
purpose, i.e., all commands are in one place, all data files in
another, documentation in a third, and so on. An alternative would
be to group files files according to the program they belong to,
i.e., all Emacs files would be in one directory, all TeX in another,
and so on. The problem with the latter approach is that it makes it
difficult to share files (the program directory often contains both
static and sharable and changing and non-sharable files), and
sometimes to even find the files (e.g., manual pages in a huge
number of places, and making the manual page programs find all of
them is a maintenance
nightmare).</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="dir-tree-overview.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="root-fs.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Overview of the Directory Tree</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="dir-tree-overview.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>The root filesystem</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>
|