>_ IzzyLab

Topic breakdown

A file descriptor is an entry in the process table referencing an open file, socket, or pipe; the kernel exposes them outward as symbolic links in the /proc/PID/fd/ directory, one per descriptor. So the task has two steps: find the PID of the port listener (via ss -ltnp or pgrep -f by part of the command line), then count the entries in its fd directory. The gotcha — use plain ls for counting, not ls -l: the latter adds a total N line that throws wc -l off by one.

What's checked

  1. number of descriptors matches the actual one

What it looks like