CompTIA Linux+ (XK0-004) — Question 160
A Linux administrator needs to remove a USB drive from a system. The unmount command fails, stating the device is busy. Which of the following commands will show the reason for this error?
Answer options
- A. lsusb | grep /mnt/usb
- B. mount | grep /mnt/usb
- C. ps aux | grep /mnt/usb
- D. lsof | grep /mnt/usb
Correct answer: D
Explanation
The correct command is 'lsof | grep /mnt/usb' as it lists open files and their associated processes, helping to identify what is keeping the USB device busy. The other commands do not provide information about processes using the device; 'lsusb' shows connected USB devices, 'mount' lists mounted filesystems, and 'ps aux' displays running processes without focusing on file usage.