nerdexam
CompTIACompTIA

XK0-005 · Question #1210

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

The correct answer is D: lsof | grep /mnt/usb. Kill the processes using the filesystem and then unmount it. The following command finds out the processes accessing the partition/filesystem. You need to run the following command as root. Here, we use the mount point /mnt/data as an example. # lsof | grep '/mnt/data' It will ou

Troubleshooting

Question

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?

Options

  • Alsusb | grep /mnt/usb
  • Bmount | grep /mnt/usb
  • Cps aux | grep /mnt/usb
  • Dlsof | grep /mnt/usb

Explanation

Kill the processes using the filesystem and then unmount it. The following command finds out the processes accessing the partition/filesystem. You need to run the following command as root. Here, we use the mount point /mnt/data as an example. # lsof | grep '/mnt/data' It will output lines like bash 17622 user1 cwd DIR 253,2 4096 2 /mnt/data If you are sure that it is safe to kill the process, you may kill them by kill or kill -9. After the processes are killed, the filesystem will be able to be unmounted.

Topics

#lsof#Filesystem Management#Troubleshooting#Linux Commands

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions