{"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":"