Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

$mkdir lnTest1 lnTest2

$ln -s lnTest1 "lnTest2" There is NO slash at the end of "lnTest2"!!

$ls lnT* -Rl |sed "s'$USER''g"
total 0

total 0
lrwxrwxrwx 1   7 Jun 22 22:48 lnTest1 -> lnTest1
share|improve this question
what is the question? – Oxinabox Jun 23 '14 at 2:12
I was trying a way to ask a question without wording it :) – Aquarius Power Jun 23 '14 at 3:51
up vote 6 down vote accepted

When the last argument to ln is a directory, the links are made in that directory. The man page says:


    ln [OPTION]... TARGET... DIRECTORY     (3rd form)

In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.

It doesn't matter whether you're creating a hard or symbolic link. cp and mv behave similarly.

share|improve this answer
I think than an alias ln='ln -T' could be a workaround, but then it would fail if I want an actual directory be recognized as such; And even if I use / at the end, it still doesnt accept the directory... so the best is know about -T ln option and use it properly, I just saw cp and mv have the same option for the exactly same purpose, thx! – Aquarius Power Jun 23 '14 at 3:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.