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.
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)- A2% (1)
- B89% (48)
- C6% (3)
- D2% (1)
- E2% (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.
lsscsi lists SCSI-connected hardware devices and provides no information about system memory or swap space configuration.
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.
/proc/icports is not a valid file in the Linux proc filesystem and does not exist on a standard Linux system.
lsusb (likely the intended command behind 'lausb') enumerates USB buses and connected devices, which is unrelated to swap or memory.
lscpu displays CPU topology, architecture, and core count information and contains no data about swap partitions or memory.
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
Community Discussion
No community discussion yet for this question.