[mdlug] Painfully simple ln -s command question

Robert Citek robert.citek at gmail.com
Thu Jan 28 01:37:56 EST 2010


On Thu, Jan 28, 2010 at 1:14 AM, Raymond McLaughlin
<driveray at ameritech.net> wrote:
> Robert Citek wrote:
>> On Thu, Jan 28, 2010 at 12:53 AM, Raymond McLaughlin
>>> The simplest way to just do it is:
>>>    $ cd bin
>>>    $ ln -s clearline cln
>>
>> $ ln -snf clearnline ~/bin/cln
>
> Thanks for the rapid reply, it works.

Glad to hear it worked for you.  Sorry about the typo in "clearline"

> I saw in the man page:
>>       -n, --no-dereference
>>               treat destination that is a symlink to a directory as if it were a normal file
>
> but it seemed to be about symlinks to directories, and I was linking to
> a regular file, so I didn't consider it.

"ln -snf" is just a habit of mine.  In your case -f and -n don't do
any harm and are extra.

> I guess I was confusing "destination" with "target". The info page is more informative.

Easy to do with ln.  ls shows the link from left to right:

cln -> clearline

which naturally makes one think that ln works in the same fashion (in
pseudo-code):

$ ln cln -> clearline

or

$ ln ~/bin/cln -> clearline

Regards,
- Robert



More information about the mdlug mailing list