nerdexam
CompTIA

XK0-006 · Question #134

A Linux systems administrator is creating a new file, /var/tmp/myfile. This file needs to point to /usr/local/myfile. Both files reside on different filesystems. Which of the following commands…

The correct answer is B. ln -s /usr/local/myfile /var/tmp/myfile. A symbolic link can reference a target located on a different filesystem, making it the correct method for creating a pointer from /var/tmp/myfile to /usr/local/myfile when the files reside on separate filesystems.

System Configuration and Management

Question

A Linux systems administrator is creating a new file, /var/tmp/myfile. This file needs to point to /usr/local/myfile. Both files reside on different filesystems. Which of the following commands should the administrator use to accomplish this task?

Options

  • Alink /usr/local/myfile /var/tmp/myfile
  • Bln -s /usr/local/myfile /var/tmp/myfile
  • Ctouch /usr/local/myfile | file /var/tmp/myfile
  • Dcat /usr/local/myfile > /var/tmp/myfile

How the community answered

(25 responses)
  • B
    92% (23)
  • C
    4% (1)
  • D
    4% (1)

Explanation

A symbolic link can reference a target located on a different filesystem, making it the correct method for creating a pointer from /var/tmp/myfile to /usr/local/myfile when the files reside on separate filesystems.

Topics

#symbolic links#cross-filesystem#ln -s#soft link

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice