QuestionQ15

System Management

A Linux systems administrator is creating the new file /var/tmp/myfile, which must point to /usr/local/myfile. The two files are on different filesystems. Which command should the administrator use to complete this task?

  • A link /usr/local/myfile /var/tmp/myfile
  • B ln -s /usr/local/myfile /var/tmp/myfile
  • C touch /usr/local/myfile | file /var/tmp/myfile
  • D cat /usr/local/myfile > /var/tmp/myfile
Explanation

A symbolic link stores a path reference and can target a file on another filesystem. The ln -s command creates that symbolic link; hard links are restricted to the same filesystem.

Community Discussion

No comments yet. Be the first to start the discussion!