Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I hate Java with passion, but symlinks (and hardlinks) are really atrocious hacks that should never have happened, and for good reasons were deprecated more than twenty years ago by the folks that created Unix in the first place.


Symlinks are actually pretty handy. Have you never seen/used:

  Current -> MyProg_1.8.9
  MyProg_1.8.9
  MyProg_1.8.8
  MyProg_1.8.7
How/why would you do that without symlinks?


You can't just say something like that unqualified. My life is made better daily by the presence of symlinks.


My life under Windows is made worse daily by its lack of, among other niceties of civilization, symlinks.

Hard-links would also be a nice addition. I am sure NTFS supports them deep inside it.


NTFS does indeed support both symbolic links and hard links in recent versions of Windows, and they can be created with the "mklink" command-line utility. (see: http://en.wikipedia.org/wiki/NTFS_symbolic_link)


NTFS always supported links, but there was no interface to actually using them from the Win32 subsystem. However the POSIX subsystem could use them since NT 3.5 at least.


is this support used by cygwin?


From memory, yes. Also, GNUS uses hardlinks, and it worked for me under Windows XP.


In fact I strongly suggest you consider ntfslink (http://elsdoerfer.name/=ntfslink) which provides a nice UI for doing all this in explorer.

As far as I can tell, reparse points for directories will usually work perfectly well for most of the things you'd expect them to. I use them, and a subversion repository to version control pretty much everything config related on my windows machine.


Seems like you managed to piss off Java as well as Unix guys in a single sentence. But a fair question is what you would use instead of links. I suppose you are talking about plan 9.


"were deprecated more than twenty years ago by the folks that created Unix in the first place" [citation needed]

Also, could you explain some more. Why do you think that they're "atrocious hacks"? They solve some problems in a quite nice way (simple versioning for example)


lotte% ls -l /bin/^(cp echo) --rwxrwxr-x M 4328 sys sys 63454 Jan 10 2007 /bin/cp --rwxrwxr-x M 4328 sys sys 57592 Jan 10 2007 /bin/echo lotte% bind /bin/echo /bin/cp lotte% cp file1 file2 file1 file2 lotte% ns |grep echo bind /bin/echo /bin/cp lotte% ls -l /bin/^(cp echo) --rwxrwxr-x M 4328 sys sys 57592 Jan 10 2007 /bin/cp --rwxrwxr-x M 4328 sys sys 57592 Jan 10 2007 /bin/echo ns|grep /bin bind /386/bin /bin bind -a /rc/bin /bin bind -a /usr/fgb/bin/rc /bin bind -a /usr/fgb/bin/386 /bin bind -a /usr/inferno/Plan9/386/bin /bin bind /bin/echo /bin/cp

here's bind(2) man page, in case you're interested in learning some 20 year old technology http://plan9.bell-labs.com/magic/man2html?man=bind&sect=...


Not sure which point was this supposed to address. It neither proves that links are "atrocious hacks", nor that links were deprecated in any way. Links may be not used in P9 of course, but that doesn't change anything in the rest of the world. If I create a research project which uses pipes as a substitute for sockets, it doesn't mean that sockets are deprecated anywhere else.

PS. This does not mean that bind is {better/worse/useless/deprecated/teh-win}. `mount -o bind` on linux exists and is not replacing sym/hard-links anytime soon.


Deprecated?! When?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: