From: ihightower on
I am using Windows XP and using cygwin.

For all these years... I was successful to create symbolic links like
this... in the directory /cgydrive/c/x (which is the same as /c/x in
my computer)

Administrator(a)bfs /c/x
$ ln -s '\\bfs\h$' csprod_h

And, I have a few of those old symlinks... for which I can do like
this:

cd /c/x/csprod_h and I will be taken there.. It still works for the
old symlinks.

But, when I create some new symlinks using the above method... for
example:

Administrator(a)bfs /c/x
$ ln -s '\\bfs2\c$' cstest_c

All, I get is a..

cstest_c and it is a "system file"... and I can't cd to that
directory.

when i open the file in text editor, this is what i have for example:

!<symlink>ÿþ\.... with some control characters..

I can't cd to that directory in cygwin nor can i double click on it in
explorer to go to the target directory.

Why the sudden change of behaviour in my system and how can I fix this
problem.

I want symlinks create like above to work.



From: Fred on
On Mar 28, 9:23 pm, ihightower <emailsrvr-gro...(a)yahoo.com> wrote:
> I am using Windows XP and using cygwin.
>
> For all these years... I was successful to create symbolic links like
> this... in the directory /cgydrive/c/x (which is the same as /c/x in
> my computer)
>
> Administrator(a)bfs /c/x
> $ ln -s '\\bfs\h$' csprod_h
>
> And, I have a few of those old symlinks... for which I can do like
> this:
>
> cd /c/x/csprod_h and I will be taken there.. It still works for the
> old symlinks.
>
> But, when I create some new symlinks using the above method... for
> example:
>
> Administrator(a)bfs /c/x
> $ ln -s '\\bfs2\c$' cstest_c
>
> All, I get is a..
>
> cstest_c and it is a "system file"... and I can't cd to that
> directory.
>
> when i open the file in text editor, this is what i have for example:
>
> !<symlink>ÿþ\.... with some control characters..
>
> I can't cd to that directory in cygwin nor can i double click on it in
> explorer to go to the target directory.
>
> Why the sudden change of behaviour in my system and how can I fix this
> problem.
>
> I want symlinks create like above to work.

Possibly because the directory you are pointing to does not exist?

Perhaps you meant to use forward slashes, not back slashes.
Cygwin takes Unix-like directory names, not Windows-like.
--
Fred K
From: Thomas 'PointedEars' Lahn on
Fred wrote:

> ihightower wrote:
>> I am using Windows XP and using cygwin.
>>
>> For all these years... I was successful to create symbolic links like
>> this... in the directory /cgydrive/c/x (which is the same as /c/x in
>> my computer)
>> [...]
>> But, when I create some new symlinks using the above method... for
>> example:
>>
>> Administrator(a)bfs /c/x
>> $ ln -s '\\bfs2\c$' cstest_c
>>
>> All, I get is a..
>>
>> cstest_c and it is a "system file"... and I can't cd to that
>> directory.
>>
>> when i open the file in text editor, this is what i have for example:
>>
>> !<symlink>ÿþ\.... with some control characters..

Looks OK.

>> I can't cd to that directory in cygwin nor can i double click on it in
>> explorer to go to the target directory.

What does

ls --color -l

or

readlink cstest_c

tell you?

>> Why the sudden change of behaviour in my system and how can I fix this
>> problem.
>>
>> I want symlinks create like above to work.
>
> Possibly because the directory you are pointing to does not exist?
>
> Perhaps you meant to use forward slashes, not back slashes.
> Cygwin takes Unix-like directory names, not Windows-like.

Not true, it used to support both, so that

ln -s 'C:\foo' bar

was equivalent to

ln -s /cygdrive/c/foo bar

But perhaps

ln -s '\\bfs2\C$' cstest_c

(capital C) works (I have never created symlinks to network shares without
an assigned drive letter). An alternative would be to try

ln -s '\\\\bfs2\\c$' cstest_c

Maybe something became buggy with the expansion of escape sequences in
single-quoted strings. (The OP should really try the Cygwin support
first.)


PointedEars
From: ihightower on
On Mar 29, 11:50 pm, Thomas 'PointedEars' Lahn <PointedE...(a)web.de>
wrote:
> Fred wrote:
> >ihightowerwrote:
> >> I am using Windows XP and using cygwin.
>
> >> For all these years... I was successful to create symbolic links like
> >> this... in the directory /cgydrive/c/x (which is the same as /c/x in
> >> my computer)
> >> [...]
> >> But, when I create some new symlinks using the above method... for
> >> example:
>
> >> Administrator(a)bfs /c/x
> >> $ ln -s '\\bfs2\c$' cstest_c
>
> >> All, I get is a..
>
> >> cstest_c and it is a "system file"... and I can't cd to that
> >> directory.
>
> >> when i open the file in text editor, this is what i have for example:
>
> >> !<symlink>ÿþ\.... with some control characters..
>
> Looks OK.
>
> >> I can't cd to that directory in cygwin nor can i double click on it in
> >> explorer to go to the target directory.
>
> What does
>
>   ls --color -l
>
> or
>
>   readlink cstest_c
>
> tell you?
>
> >> Why the sudden change of behaviour in my system and how can I fix this
> >> problem.
>
> >> I want symlinks create like above to work.
>
> > Possibly because the directory you are pointing to does not exist?
>
> > Perhaps you meant to use forward slashes, not back slashes.
> > Cygwin takes Unix-like directory names, not Windows-like.
>
> Not true, it used to support both, so that
>
>   ln -s 'C:\foo' bar
>
> was equivalent to
>
>   ln -s /cygdrive/c/foo bar
>
> But perhaps
>
>   ln -s '\\bfs2\C$' cstest_c
>
> (capital C) works (I have never created symlinks to network shares without
> an assigned drive letter).  An alternative would be to try
>
>   ln -s '\\\\bfs2\\c$' cstest_c
>
> Maybe something became buggy with the expansion of escape sequences in
> single-quoted strings.  (The OP should really try the Cygwin support
> first.)
>
> PointedEars

Thank you for your reply.. But, still not work with all your
suggestions..

I have made sure that I can cd to the directory and verified it. Even
did cd to a local directory (not in share)...

ln -s '/cygdrive/c/TEST/' test_f

this creates a system file too... and i can't double click or cd to
there.

i tried both of your tests... and this is the result

$ ls --color -l test_f
lrwxrwxrwx 1 Administrator None 17 2010-03-31 17:01 test_f -> /
cygdrive/c/Test//

$ readlink test_f
/cygdrive/c/Test/

but as i said.. in windows explorer.. it says..

test_f 1KB System file

while all my other earlier symbolic links are

itshare 1KB Shortcut


??????????????totally confused.




The director exists..
From: Thomas 'PointedEars' Lahn on
ihightower wrote:

> I have made sure that I can cd to the directory and verified it. Even
> did cd to a local directory (not in share)...
>
> ln -s '/cygdrive/c/TEST/' test_f

Maybe you should not single-quote the target path?

> this creates a system file too... and i can't double click or cd to
> there.
>
> i tried both of your tests... and this is the result
>
> $ ls --color -l test_f
> lrwxrwxrwx 1 Administrator None 17 2010-03-31 17:01 test_f -> /
> cygdrive/c/Test//

ISTM that because of the single-quoting there's an extra `/' now, so that
might as well be the problem. (I have not used Cygwin since half a year, I
like real GNU/Linux better :))

> $ readlink test_f
> /cygdrive/c/Test/

That's a bit weird, though. Why should there be an extra slash above and
not here? Have you aliased `ls' to `ls -p' or `ls -F'?

> but as i said.. in windows explorer.. it says..
>
> test_f 1KB System file
>
> while all my other earlier symbolic links are
>
> itshare 1KB Shortcut

The File Type column is rather meaningless in Windows Explorer. You need
to enable the display of filename extensions for the first column to see
what is really going on. "Shortcuts" should have the suffix .LNK, "System
files" would not.

> ??????????????totally confused.

Your Question Mark key is borken.

Please trim your quotes to the relevant minimum next time.


PointedEars