{"id":693,"date":"2014-03-27T15:53:45","date_gmt":"2014-03-27T22:53:45","guid":{"rendered":"http:\/\/todaywasawesomecom.local\/?p=693"},"modified":"2014-04-11T22:33:31","modified_gmt":"2014-04-12T05:33:31","slug":"i-learned-about-hard-links-in-nix-the-other-day-and-its-changed-my-life","status":"publish","type":"post","link":"https:\/\/todaywasawesomecom.local\/i-learned-about-hard-links-in-nix-the-other-day-and-its-changed-my-life\/","title":{"rendered":"I learned about hard links in *nix the other day and its changed my life."},"content":{"rendered":"

Sometimes you want a file in more than one place so you copy it. Since we’re talking *nix you cp, rsync, cat > out, or whatever. But that is lame because now you’re storing the same data in two places. LAME!<\/p>\n

If you came from windows this is when you say “oh, I can just make a shortcut!” but shortcuts are lame because they break all the time. There’s something better to do!<\/p>\n

ln \/somepath\/file1 \/somepath\/file2<\/p>\n

This is the link command. It will make the file appear in two places at once without actually copying the data. Delete file1 and file2 still exists, no data was actually deleted. The data won’t be deleted until you delete both file1 and file2.<\/p>\n

Love it.<\/p>\n","protected":false},"excerpt":{"rendered":"

Sometimes you want a file in more than one place so you copy it. Since we’re talking *nix you cp, rsync, cat > out, or whatever. But that is lame because now you’re storing the same data in two places. LAME! If you came from windows this is when you say “oh, I can just […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[],"psp_head":"I learned about hard links in *nix the other day and its changed my life. \u2013 Today Was Awesome<\/title>\r\n<meta name=\"description\" content=\"Sometimes you want a file in more than one place so you copy it. Since we're talking *nix you cp, rsync, cat > out, or whatever. But that is lame because now you're storing the same data in two places.\" \/>\r\n<meta name=\"robots\" content=\"index,follow\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/todaywasawesomecom.local\/i-learned-about-hard-links-in-nix-the-other-day-and-its-changed-my-life\/\" \/>\r\n","_links":{"self":[{"href":"https:\/\/todaywasawesomecom.local\/wp-json\/wp\/v2\/posts\/693"}],"collection":[{"href":"https:\/\/todaywasawesomecom.local\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/todaywasawesomecom.local\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/todaywasawesomecom.local\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/todaywasawesomecom.local\/wp-json\/wp\/v2\/comments?post=693"}],"version-history":[{"count":1,"href":"https:\/\/todaywasawesomecom.local\/wp-json\/wp\/v2\/posts\/693\/revisions"}],"predecessor-version":[{"id":694,"href":"https:\/\/todaywasawesomecom.local\/wp-json\/wp\/v2\/posts\/693\/revisions\/694"}],"wp:attachment":[{"href":"https:\/\/todaywasawesomecom.local\/wp-json\/wp\/v2\/media?parent=693"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/todaywasawesomecom.local\/wp-json\/wp\/v2\/categories?post=693"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/todaywasawesomecom.local\/wp-json\/wp\/v2\/tags?post=693"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}