{"id":278,"date":"2006-11-05T09:03:48","date_gmt":"2006-11-05T09:03:48","guid":{"rendered":"http:\/\/neosmart.net\/blog\/archives\/278"},"modified":"2018-02-08T18:37:42","modified_gmt":"2018-02-09T00:37:42","slug":"symlinks-on-vista","status":"publish","type":"post","link":"https:\/\/neosmart.net\/blog\/symlinks-on-vista\/","title":{"rendered":"Vista Gets It: Symlinks at Last!"},"content":{"rendered":"<p>OK, we take <a href=\"https:\/\/neosmart.net\/blog\/microsoft-murders-max\/\" rel=\"follow\">our last post<\/a> back, Vista <em>does<\/em> have several exciting features to blog home about (and guys, for the last time, that comment\u2019s what they call <strong>sarcasm<\/strong>!) one of which is the much requested \u201cSymlinks\u201d feature. It\u2019s been in practically every other operating system for the past decade+ and is one of the most essential time-saving devices ever to be implemented. For those of you (Windows-dwelling creatures) that don\u2019t know what a symlink is yet, here\u2019s the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Symlink\" rel=\"follow\">Wikipedia definition<\/a>.<\/p>\n<p>Symlinks save tons of space by making files \u201cpretend\u201d to exist where they don\u2019t, but even more importantly is the time they save by allowing you to create\/reference a static filepath in all your programs \u2013 then have that \u201cfile\u201d redirect to the real deal, no matter how often it changes. If you\u2019re a web-dev kinda\u00a0guy, think of it as mod_rewrite for your hard drive, without the <abbr title=\"Perl-Compatible Regular Expressions\">PCRE<\/abbr> libraries though\u2026 (come to think of it, the first OS to implement regex into symlinks has my vote!)<\/p>\n<p><!--more--><\/p>\n<p>On Linux\/BSD\/Unix it\u2019s called <code>ln<\/code>:<\/p>\n<pre><code class=\"language-sh\">CG@neosmart [~]# ln --help\r\nUsage: ln [OPTION]... TARGET [LINK_NAME]\r\n  or:  ln [OPTION]... TARGET... DIRECTORY\r\n  or:  ln [OPTION]... --target-directory=DIRECTORY TARGET...\r\n<\/code><\/pre>\n<p>but if you&#8217;re reading this, you probably already knew that; or at the very least you know where you can <a href=\"http:\/\/original.jamesthornton.com\/linux\/man\/ln.1.html\" rel=\"follow\">find the man page<\/a>.<\/p>\n<p>On Windows, it\u2019s a very similar procedure. Microsoft had long promised that symlinks would ship with Vista, and every build we\u2019ve been enthusiastically entering the <span style=\"font-family: Consolas,Courier,Monospace;\">ln<\/span> command and hoping to get something other than the dreaded <\/p>\n<p><code>'ln' is not recognized as an internal or external command, operable program or batch file.<\/code><\/p>\n<p>But it turns out that it&#8217;s been in there for a while \u2014 just hiding under a different name. It\u2019s called <code>mklink<\/code> (in keeping with the <code>mkdir<\/code> nomenclature obviously), and it works just as well.<\/p>\n<pre><code class=\"language-batch\">C:\\Users\\Computer Guru.NEOSMART&gt;mklink\r\nCreates a symbolic link.\r\n\r\nMKLINK [[\/D] | [\/H] | [\/J]] Link Target\r\n\r\n        \/D      Creates a directory symbolic link.  Default is a file\r\n                symbolic link.\r\n        \/H      Creates a hard link instead of a symbolic link.\r\n        \/J      Creates a Directory Junction.\r\n        Link    specifies the new symbolic link name.\r\n        Target  specifies the path (relative or absolute) that the new link\r\n                refers to.\r\n<\/code><\/pre>\n<p><em>Now all Microsoft needs is to implement a mod_rewrite (or use one of the existing open-source implementations?) into IIS7 to suddenly kick-up the competition a notch\u2026<\/em><\/p>\n<p><small><em>Hat Tip<\/em>: Thanks to Kristan Kenney!<\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>OK, we take our last post back, Vista does have several exciting features to blog home about (and guys, for the last time, that comment\u2019s what they call sarcasm!) one of which is the much requested \u201cSymlinks\u201d feature. It\u2019s been &hellip; <a href=\"https:\/\/neosmart.net\/blog\/symlinks-on-vista\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[127,53],"class_list":["post-278","post","type-post","status-publish","format-standard","hentry","category-software","tag-symlinks","tag-vista"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4xDa-4u","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/comments?post=278"}],"version-history":[{"count":6,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/278\/revisions"}],"predecessor-version":[{"id":4396,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/278\/revisions\/4396"}],"wp:attachment":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/media?parent=278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/categories?post=278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/tags?post=278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}