Which command shows the size of a directory in a human-readable form?

Study for the Google Data Center Technician Exam. Utilize flashcards and multiple choice questions, complete with hints and detailed explanations. Get prepared for your certification!

Multiple Choice

Which command shows the size of a directory in a human-readable form?

Explanation:
To see how much disk space a directory uses, you use the du command, which reports the disk usage of files and directories. The -s option gives a single total for the specified directory, and -h formats that number in human-readable units (K, M, G). Running du -sh /path outputs the total size of /path, including all subdirectories and files inside it. Other options don’t provide a single, human-readable total for just that directory: df shows filesystem usage rather than a directory’s size, ls -lh lists individual file sizes, and du -a shows every file and directory’s size instead of a summed total.

To see how much disk space a directory uses, you use the du command, which reports the disk usage of files and directories. The -s option gives a single total for the specified directory, and -h formats that number in human-readable units (K, M, G). Running du -sh /path outputs the total size of /path, including all subdirectories and files inside it. Other options don’t provide a single, human-readable total for just that directory: df shows filesystem usage rather than a directory’s size, ls -lh lists individual file sizes, and du -a shows every file and directory’s size instead of a summed total.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy