You are experimenting with a binary in /tmp/foo.d that expects its configuration file at/etc/foo.conf
You don’t want to save it there, but use a symbolic link to /tmp/foo.d/foo.conf instead.
Which command would accomplish that?
A.
ln -s /tmp/foo.d/foo.conf /etc/foo.conf
B.
ln -s /etc/foo.conf /tmp/foo.d/foo.conf
C.
ln /tmp/foo.d/foo.conf /etc/foo.conf
D.
ln /etc/foo.conf /tmp/foo.d/foo.conf
Explanation:
The ln command is used to create the link.
There are two types of link a. Soft link b. Hard link.
a. Soft link Etan create for directory also, can span multiple partitions but available until and unless Original Files remain.
b. Hard link separate Physical File, can’t create for directory, can’t span multiple file but remains the link file if original file removed.
Syntax for Hard link: ln original file linkfile
the correct answer is option: A Because the question specific to use symbolic link not hard link.
see the same question in: http://www.aiotestking.com/2011/07/which-command-would-accomplish-to-use-a-symbolic-link-to-tmpfoo-dfoo-conf/