{"id":18917,"date":"2013-12-05T19:48:08","date_gmt":"2013-12-05T17:48:08","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=18917"},"modified":"2013-12-05T19:49:48","modified_gmt":"2013-12-05T17:49:48","slug":"how-many-lines-of-code-have-survived-to-the-current-day-from-the-original-linux-kernel","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2013\/12\/05\/how-many-lines-of-code-have-survived-to-the-current-day-from-the-original-linux-kernel\/","title":{"rendered":"How many lines of code have survived to the current day from the original Linux kernel"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>Here is a excellent Quora question: <a href=\"http:\/\/www.quora.com\/Linux\/How-many-lines-of-code-if-any-from-Linux-1-0-are-still-in-the-modern-Linux-kernel-and-what-is-it\">how many lines of code, if any, from Linux 1.0 are still in the modern Linux kernel, and what is it?<\/a> \u00a0And an evenly excellent answer:<\/p>\n<blockquote><p>According to <em>git diff<\/em>, 21228 of the 176250 lines from Linux 1.0 (1994-03-14) are still present in Linux 3.12 (2013-11-03):<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n$ empty_tree=&quot;$(git mktree &amp;lt; \/dev\/null)&quot;\r\n$ git diff --shortstat &quot;$empty_tree&quot; 1.0\r\n561 files changed, 176250 insertions(+)\r\n$ git diff --shortstat -M -l99999 1.0 v3.12\r\n44905 files changed, 17702349 insertions(+), 155022 deletions(-)\r\n<\/pre>\n<p>Over half of these lines are blank or consist entirely of punctuation; only 10419 of them have at least one letter or number.<\/p>\n<p>We can go back even farther to the very first public release, Linux 0.01 (1991-09-17). Of the 10239 lines in Linux 0.01, 954 survive in Linux 3.12, of which just 242 have at least one letter or number. 123 of them were structs and constants in include\/a.out.h (now include\/uapi\/linux\/a.out.h), and 26 of them were the <em>S_*<\/em> macros in include\/sys\/stat.h (now include\/uapi\/linux\/stat.h). The rest were scattered through 24 other files with at most 9 lines each.<\/p><\/blockquote>\n<p>It might appear that not much. \u00a0 But it is in fact impressive. \u00a0How much code have you written that survived for over 20 years in a project that has changed so much &#8211; from a hobby experiment to a dominant operating system across servers, mobiles, and embedded devices?<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Here is a excellent Quora question: how many lines of code, if any, from Linux 1.0 are still in the modern Linux kernel, and what is it? \u00a0And an evenly excellent answer: According to git diff, 21228 of the 176250 lines from Linux 1.0 (1994-03-14) are still present in Linux 3.12 (2013-11-03): $ empty_tree=&quot;$(git mktree &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2013\/12\/05\/how-many-lines-of-code-have-survived-to-the-current-day-from-the-original-linux-kernel\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How many lines of code have survived to the current day from the original Linux kernel<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,6,18,133,62],"tags":[286,1531,1588],"keyring_services":[],"class_list":["post-18917","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-programming","category-sysadmin","category-technology","tag-history","tag-operating-systems","tag-version-control"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":28827,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/09\/30\/highlights-from-git-2-19-and-php-syntax\/","url_meta":{"origin":18917,"position":0},"title":"Highlights from Git 2.19 and PHP syntax","author":"Leonid Mamchenkov","date":"September 30, 2018","format":false,"excerpt":"GitHub blog covers the highlights from Git 2.19, which was recently released. One particular change that I want to highlight (which GitHub skipped in their highlights, but which exists in the Git release notes for this version) is the syntax pattern update for the PHP files. Let's have a look\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/09\/git-range-diff-500x243.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":16893,"url":"https:\/\/mamchenkov.net\/wordpress\/2012\/11\/05\/who-needs-css-frameworks-right\/","url_meta":{"origin":18917,"position":1},"title":"Who needs CSS frameworks, right?","author":"Leonid Mamchenkov","date":"November 5, 2012","format":false,"excerpt":"I've had one of those very productive days at work. \u00a0A rather large CSS re-factoring has been completed without too much obvious breakage. \u00a0How big of a re-factoring? \u00a0That's how big: [code lang=\"bash\" light=\"true\"] $ git diff ae5bedf..HEAD | diffstat -s 345 files changed, 516 insertions(+), 8430 deletions(-) [\/code] Can't\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26685,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/09\/12\/git-history-of-a-source-code-line\/","url_meta":{"origin":18917,"position":2},"title":"git: history of a source code line","author":"Leonid Mamchenkov","date":"September 12, 2016","format":false,"excerpt":"git is one of those tools that no matter how much you know about it, there is an infinite supply of new things to learn. \u00a0Here's a handy bit I've discovered recently, thanks to this StackOverflow comment: Since Git 1.8.4, git log has -L to view the evolution of a\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":44332,"url":"https:\/\/mamchenkov.net\/wordpress\/2019\/10\/10\/git-tips-disable-diff-prefix\/","url_meta":{"origin":18917,"position":3},"title":"Git tips: disable diff prefix","author":"Leonid Mamchenkov","date":"October 10, 2019","format":false,"excerpt":"https:\/\/twitter.com\/brandur\/status\/1182066723337293828 Pure gold.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26190,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/06\/15\/diff-so-fancy-the-best-lookin-diffs\/","url_meta":{"origin":18917,"position":4},"title":"diff-so-fancy &#8211; the best-lookin&#8217; diffs","author":"Leonid Mamchenkov","date":"June 15, 2016","format":false,"excerpt":"Here is a cool tool to spice up your regular boring looking diffs - diff-so-fancy. \u00a0Don't get spooked by the npm installation instructions - the meat of it is all in perl\/shell and you can install it as any other ~\/bin\/ script. \u00a0Have a look at what you are missing:","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"diff-so-fancy","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/06\/diff-so-fancy-500x448.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":26154,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/06\/03\/deploying-with-git\/","url_meta":{"origin":18917,"position":5},"title":"Deploying with git","author":"Leonid Mamchenkov","date":"June 3, 2016","format":false,"excerpt":"Git is an excellent version control, but it's more than just that. \u00a0A lot of people use it to deploy their projects as well. \u00a0Most suggestions (for example, this tutorial from Digital\u00a0Ocean) around the web employ the post-commit (or other) hooks to push the code to a remote server. \u00a0While\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/18917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=18917"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/18917\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=18917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=18917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=18917"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=18917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}