{"id":5567,"date":"2024-12-02T16:26:16","date_gmt":"2024-12-02T15:26:16","guid":{"rendered":"https:\/\/sunpig.com\/martin\/?p=5567"},"modified":"2024-12-02T16:28:56","modified_gmt":"2024-12-02T15:28:56","slug":"little-victories","status":"publish","type":"post","link":"https:\/\/sunpig.com\/martin\/2024\/12\/02\/little-victories\/","title":{"rendered":"Little victories"},"content":{"rendered":"\n<p>After working with Linux on a day to day basis for a <em>long, long time<\/em> now, it was today that I finally clicked with the <code>ln -s<\/code> command for making symbolic links, aka &#8220;shortcuts&#8221; in the file system. When using that command with two parameters, one of them is the source\/origin of the link and the other one is the target. I&#8217;ve always struggled to remember if &#8220;source&#8221; is the actual file on disk, or the place where I want to link from (the &#8220;origin&#8221; of my jumping to the destination). What do I write first? The location where I want the shortcut to appear, or the location of the actual file?<\/p>\n\n\n\n<p>Well, I struggle no more. (Probably. It&#8217;s very possible that I&#8217;ll forget this in a week.) It&#8217;s because when I checked the documentation (for the <em>n<\/em>-th time) today, I saw that the <code>ln<\/code> command can take different forms depending on the number of parameters you feed it:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>ln -s &lt;file&gt; <\/code>This will create a <strong>link to <\/strong><code>&lt;file&gt;<\/code> in the <strong>current working directory<\/strong><\/li>\n\n\n\n<li><code>ln -s &lt;file&gt; &lt;place&gt;<\/code> This will create a <strong>link to<\/strong> &lt;file&gt; in the <strong>place that you specify<\/strong> as the second parameter<\/li>\n<\/ul>\n\n\n\n<p>The thing that caused it to click for me was realizing that the second parameter is <em>optional<\/em>, which means that the first parameter logically <em>must<\/em> be the actual file.<\/p>\n\n\n\n<p>It all makes sense if you stare at it for long enough. Say, 25+ years.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After working with Linux on a day to day basis for a long, long time now, it was today that I finally clicked with the ln -s command for making symbolic links, aka &#8220;shortcuts&#8221; in the file system. When using that command with two parameters, one of them is the source\/origin of the link and &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/sunpig.com\/martin\/2024\/12\/02\/little-victories\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Little victories&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-5567","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/posts\/5567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/comments?post=5567"}],"version-history":[{"count":2,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/posts\/5567\/revisions"}],"predecessor-version":[{"id":5570,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/posts\/5567\/revisions\/5570"}],"wp:attachment":[{"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/media?parent=5567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/categories?post=5567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/tags?post=5567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}