nerdexam
CompTIACompTIA

XK0-005 · Question #795

XK0-005 Question #795: Real Exam Question with Answer & Explanation

The correct answer is A: find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n. When disk space issues arise despite low percentage usage, it often indicates an abundance of small files consuming inodes. The find command with -type f is used to count regular files, helping identify directories with an excessive number of files.

Troubleshooting

Question

An administrator has received multiple tickets relating to a lack of a disk space on a few servers, but the percentage of disk space usage is below the threshold. The following shows further analysis and findings: Which of the following commands should the administrator use to help identify the issue?

Options

  • Afind . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n
  • Bfind . -xdev -type p | cut -d "/" -f 2 | sort | uniq -c | sort -n
  • Cfind . -xdev -type s | cut -d "/" -f 2 | sort | uniq -c | sort -n
  • Dfind . -xdev -type d | cut -d "/" -f 2 | sort | uniq -c | sort -n

Explanation

When disk space issues arise despite low percentage usage, it often indicates an abundance of small files consuming inodes. The find command with -type f is used to count regular files, helping identify directories with an excessive number of files.

Common mistakes.

  • B. -type p refers to named pipes (FIFOs), which are typically not the cause of inode exhaustion on a large scale.
  • C. -type s refers to sockets, which are also unlikely to be the primary cause of widespread inode exhaustion.
  • D. -type d refers to directories, and while directories consume inodes, the issue described is more often due to a large number of regular files, not just directories themselves.

Concept tested. Linux filesystem troubleshooting, inode exhaustion, find command

Reference. https://man7.org/linux/man-pages/man1/find.1.html

Topics

#Linux Commands#File System Utilities#Inode Management#Disk Space Diagnostics

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions