nerdexam
CompTIA

XK0-004 · Question #461

Which of the following commands will verify the size of a swap partition? (Seled TWO).

The correct answer is B. cat /proc/meminfo F. lablk. Two Linux commands can report swap partition size: /proc/meminfo exposes swap memory statistics from the kernel, and lsblk lists block devices including swap partitions with their sizes.

System Management

Question

Which of the following commands will verify the size of a swap partition? (Seled TWO).

Options

  • Alsscsi
  • Bcat /proc/meminfo
  • Ccat /proc/icports
  • Dlausb
  • Elscpu
  • Flablk

How the community answered

(54 responses)
  • A
    2% (1)
  • B
    89% (48)
  • C
    6% (3)
  • D
    2% (1)
  • E
    2% (1)

Why each option

Two Linux commands can report swap partition size: /proc/meminfo exposes swap memory statistics from the kernel, and lsblk lists block devices including swap partitions with their sizes.

Alsscsi

lsscsi lists SCSI-connected hardware devices and provides no information about system memory or swap space configuration.

Bcat /proc/meminfoCorrect

The /proc/meminfo virtual file is populated by the Linux kernel and includes SwapTotal, SwapFree, and SwapCached fields that directly report the size and current usage of swap space.

Ccat /proc/icports

/proc/icports is not a valid file in the Linux proc filesystem and does not exist on a standard Linux system.

Dlausb

lsusb (likely the intended command behind 'lausb') enumerates USB buses and connected devices, which is unrelated to swap or memory.

Elscpu

lscpu displays CPU topology, architecture, and core count information and contains no data about swap partitions or memory.

FlablkCorrect

lsblk (the exam choice labeled 'lablk' is a typo for 'lsblk') lists all block devices and partitions including those of type swap, displaying their sizes and mount points, which confirms swap partition size.

Concept tested: Linux commands for inspecting swap partition size

Source: https://man7.org/linux/man-pages/man5/proc.5.html

Topics

#swap partition#/proc/meminfo#lsblk#memory management

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice