\begin{exe} {Sizes of the Default Linux Directories}

   Use the \textbf{du} utility to calculate the overall
   size of each of your system's top-level directories.

   Type the command:
   \begin{cmd}
$ du --help
   \end{cmd}
   for hints on how to obtain and display this result
   efficiently.

   \begin{sol}

      To obtain a full list of directories under / along
      with their size:

      \begin{cmd}
$ sudo du --max-depth=1 -hx /
      \end{cmd}
      \begin{response}
4.3M    /home
16K     /lost+found
39M     /etc
4.0K    /srv
3.6M    /root
178M    /opt
138M    /boot
6.1G    /usr
1.1G    /var
16K     /mnt
4.0K    /media
869M    /tmp
8.4G    /
      \end{response}
      Where we have used the options:
      \begin{itemize}
         \item
         \verb?--maxdepth=1?: Just go down one level from
         \filelink{/}  and sum up everything recursively
         underneath in the tree.
         \item
         \verb?-h?: Give human-readable numbers (KB, MB, GB).
         \item
         \verb?-x? Stay on one filesystem; don't look at
         directories that are not on the \filelink{/} partition.
         In this case that means ignore:
         \begin{cmd}
/dev /proc /run /sys
         \end{cmd}
         because these are pseudo-filesystems which exist
         in memory only; they are just empty mount points
         when the system is not running.  Because this was
         done on a \textbf{RHEL} system, the following mount
         points are also not followed:
         \begin{cmd}
/bin /sbin /lib /lib64
         \end{cmd}
         since they are just symbolically linked to their
         counterparts under \filelink{/usr}.
      \end{itemize}
   \end{sol}
\end{exe}

