df (disk free) usage: Which option with the df command includes a grand total of disk space across the listed file systems?

Difficulty: Medium

Correct Answer: -t

Explanation:


Introduction / Context:
The df command summarizes disk capacity and usage across mounted file systems. Some UNIX variants provide an option to display a grand total line that sums the sizes and usage for easier capacity planning. Knowing per-platform flags helps administrators standardize reports and scripts.



Given Data / Assumptions:

  • We are using a traditional UNIX variant where df supports a total line option.
  • Question asks for the option that includes the total amount of disk space across file systems.
  • We are not focusing on filesystem-type filters or inode-only reports.


Concept / Approach:

Historically, some df implementations use a specific flag to add a final total line. On certain UNIX variants, the -t flag provides a total summary line (note that on GNU/Linux, -c is used, and -t filters by type). In exam-style questions tied to classical UNIX, -t is commonly taught as the totalizing flag.



Step-by-Step Solution:

Run df with the specified option to list mounted file systems.Observe an additional “total” line providing aggregate blocks, used, and available figures.Use human-readable switches (where available) for clarity.Compare with without the option to confirm presence of the total line.Document behavior differences across UNIX flavors in team runbooks.


Verification / Alternative check:

On GNU coreutils, df -c provides totals, whereas -t filters by type. On exam contexts referencing traditional UNIX, -t is used for totals. Always check man df on your platform to verify exact semantics.



Why Other Options Are Wrong:

b: Not a standard df option.

c: -4 is not a standard df flag for totals.

d: -i reports inode statistics, not total space lines.

e: Not applicable under the assumed traditional semantics.



Common Pitfalls:

Assuming GNU/Linux semantics on all platforms; confusing total lines with file-system type filters; forgetting that scripting across heterogeneous systems requires conditional flags.



Final Answer:

-t

More Questions from Unix

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion